Message Boards Message Boards

Avoid tooltip label display wrong data?

Posted 7 years ago

Question to Community Forum,

I plotted some data with Tooltip, but the Tooltip label displays worn data at two points.

When mouse is pointed at points x:75 should be displaced y:247 instead of y:250 and at x:77 should be displaced y:124 instead of y:120. Does anyone know why and can you help?

fakedata = {{0, 71}, {1, 3}, {2, 11}, {3, 49}, {4, 27}, {5, 40}, {6, 
    38}, {7, 60}, {8, 76}, {9, 60}, {10, 60}, {11, 52}, {12, 73}, {13,
     100}, {14, 54}, {15, 49}, {16, 58}, {17, 60}, {18, 60}, {19, 
    39}, {20, 49}, {21, 35}, {22, 34}, {23, 44}, {24, 5}, {25, 
    52}, {26, 2}, {27, 52}, {28, 47}, {29, 25}, {30, 32}, {31, 
    34}, {32, 41}, {33, 30}, {34, 30}, {35, 36}, {36, 18}, {37, 
    23}, {38, 42}, {39, 19}, {40, 25}, {41, 20}, {42, 35}, {43, 
    18}, {44, 22}, {45, 22}, {46, 24}, {47, 27}, {48, 29}, {49, 
    6}, {50, 36}, {51, 4}, {52, 37}, {53, 34}, {54, 19}, {55, 
    33}, {56, 34}, {57, 29}, {58, 30}, {59, 38}, {60, 31}, {61, 
    21}, {62, 30}, {63, 64}, {64, 43}, {65, 44}, {66, 49}, {67, 
    66}, {68, 59}, {69, 50}, {70, 67}, {71, 45}, {72, 62}, {73, 
    56}, {74, 20}, {75, 247}, {76, 7}, {77, 124}, {78, 54}, {79, 
    38}, {80, 35}, {81, 32}, {82, 35}, {83, 23}, {84, 21}, {85, 
    13}, {86, 10}, {87, 13}, {88, 20}, {89, 10}, {90, 6}, {91, 
    5}, {92, 4}, {93, 4}, {94, 1}, {95, 4}, {96, 2}, {97, 8}, {98, 
    2} , {99, 0}, {100, 15}};
Length[fakedata]

ListPlot[
 Tooltip[
  fakedata]
 , PlotLabel -> Style["Title", Bold, 14]
 , Frame -> True
 , FrameLabel -> {"x-axis", "y-axis"}
 , PlotStyle -> Directive[PointSize[Medium], Blue]
 , PlotRange -> {{0, 101}, {1, 250}}
 , Filling -> Axis
 , FillingStyle -> Opacity[0.2] 
 , GridLines -> Automatic
 , GridLinesStyle -> Directive[Black, Dotted]
 , ImageSize -> 400
 , Epilog -> {Dynamic@AbsolutePointSize[7 Clock[] + 1], Red, 
   Point[{{75, 247}, {77, 124}}]}
 ]

enter image description here

POSTED BY: Jos Klaps
3 Replies

Dear Manjunathy Babu and Neil Singer,

Thanks for your reply. I got two MM Home Edition versions installed e.g; 10.0.2.0 (desktop - Windows 7 - 64 bit) and 10.4.0.0 (laptop - Windows 7 - 64 bit). Now it seems that the code works properly in my old version 10.0.2.0 but not in version 10.4.0.0.

It seem a bug in version 10.4.0.0.

Can someone from the Community Team confirm ?

Thanks !

POSTED BY: Jos Klaps

it works properly on my mac running 11.1. I get {75,247} and {77, 124}

POSTED BY: Neil Singer

When I hovered my mouse pointer on both points (See below GIF) , it shows (x:75, y:247) for the left longer line. (x:77, y:124) for the right shorter line. Its giving a correct output on my Mac, Mathematica v11.

enter image description here

POSTED BY: Manjunath Babu
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract