ListLinePlot and Tooltip
- To: mathgroup at smc.vnet.net
- Subject: [mg91259] ListLinePlot and Tooltip
- From: dkr <dkrjeg at gmail.com>
- Date: Tue, 12 Aug 2008 04:46:03 -0400 (EDT)
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 dkr