Group Abstract Group Abstract

Message Boards Message Boards

Create a ListLogLogPlot with countries data and use Tooltip?

Posted 9 years ago
POSTED BY: Megri Youcef
2 Replies
Posted 9 years ago

Thank you Patrick, a good trick to bypass this problem.

POSTED BY: Megri Youcef

Then create a function, that gives you a tooltip and ignores the 3rd argument:

Tooltip[#1, #2] &

That being said, the following works

data = EntityValue[EntityClass["Country", "Countries"], {"Name", "Area", "Population"}];
annot = data /. 
   MapThread[{#1, a_, b_} :> #2[{a, b}, n, #3] &, {
    { n : "Macau" | "Monaco" | "India",
      n : "Pitcairn Islands" | "Svalbard" | "Greenland", 
      n : "Russia" | "China", n : "Vatican City", n_},
    {Callout, Callout, Callout, Callout, Tooltip[#1, #2] &}, 
    {Above, Below, After, Before, ItDoesntMatterWhatIsHere}}];

ListLogLogPlot[annot, PlotTheme -> "Detailed",  FrameLabel -> Automatic]
POSTED BY: Patrick Scheibe
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard