Re: Bug: ListPlot and Tooltip
- To: mathgroup at smc.vnet.net
- Subject: [mg102570] Re: Bug: ListPlot and Tooltip
- From: dr DanW <dmaxwarren at gmail.com>
- Date: Fri, 14 Aug 2009 06:00:09 -0400 (EDT)
- References: <h5bk30$hja$1@smc.vnet.net> <h5jdkb$1a2$1@smc.vnet.net>
Perhaps calling it a bug was too strong; there is a discrepancy in the
behavior of ListPlot and ListLogPlot.
In ListLogPlot, Tooltip wraps the entire dataset:
In[1]: InputForm[ ListLogPlot[ Tooltip[ Range[4], "Data" ] ] ]
Out[1]: Graphics[{{{}, Tooltip[{Hue[0.67, 0.6, 0.6], Point[{{1., 0.},
{2.,
0.6931471805599453}, {3., 1.0986122886681098}, {4.,
1.3862943611198906}}]}, "Data"]...
However, if I use ListPlot instead, I loose Tooltip entirely
In[2]: InputForm[ ListPlot[ Tooltip[ Range[4], "Data" ] ] ]
Out[2]: Graphics[{Hue[0.67, 0.6, 0.6], Point[{{1., 1.}, {2., 2.}, {3.,
3.}, {4., 4.}}]}...
After having successfully used Tooltip with ListLogPlot for many
months, it was quite a surprise to have my tooltips disappear just
because I changed my x-axis scale.
I have seen several discussions on this group on the nature of the
term "bug", and I don't really want to start another one. I have
learned high standards from Mathematica. One of its basic tenets is
"if it works at all, it works everywhere". This has caused me to
expect that if I see tooltips in ListLogPlot, I should see them in
ListPlot.
So, I am not looking for a solution here. I'm already aware that I
can map Tooltip onto individual data points. I only posted this "bug"
to let the people who want to use my legend workaround that it is not
going to work with ListPlot.
Daniel