MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

ListLinePlot and Tooltip

Start with a simple plot:

(1)  ListLinePlot[{{{1, 1}, {2, 2}}}]   (We get the expected result.)

Now just add tooltips to the two points of the curve:

(2)  ListLinePlot[{{Tooltip[{1, 1}], Tooltip[{2, 2}]}}]    (A pair of
axes are drawn but no curve.)

Next add a third point to the list, also with Tooltip:

(3)  ListLinePlot[{{Tooltip[{1, 1}], Tooltip[{2, 2}],
   Tooltip[{3, 2.5}]}}]   (Now we get the curve drawn correctly.)

Next take (1) and add a second curve:

(4)  ListLinePlot[{{{1, 1}, {2, 2}}, {{1, 1.5}, {2, 2.5}}}]   (We get
both curves drawn as expected.)

Next add Tooltips to the points on the second curve:

(5)  ListLinePlot[{{{1, 1}, {2, 2}}, {Tooltip[{1, 1.5}],
   Tooltip[{2, 2.5}]}}]   (Neither curve is drawn.)

In these examples, whenever we have a curve with exactly two points
and Tooltips (see (2) and (5)), ListLinePlot does not draw the curves.
Removing the Tooltips (see (1) and (4)) or just adding a third point
(see (3)) restores the drawing of the curves.  Can anyone explain why?

Mathematica 6.0.1 on OS10.5.2

  • Prev by Date: Re: minimize with complex numbers
  • Next by Date: Re: Integrating DiracDelta to get UnitStep
  • Previous by thread: Re: fractional derivative (order t) of (Log[x])^n and Log[Log[x]] etc.?
  • Next by thread: Re: ListLinePlot and Tooltip