Message Boards Message Boards

Why Tooltip is not working?

Posted 10 years ago

Dear All, I got a nice code (my feeling) but when I tried to intro the function 'Tooltip' without any success. Please can someone help to add this function into the attached file. Thanks. Jos

POSTED BY: Jos Klaps
7 Replies

Hi Isaac, Sorry for my late reply. Many thanks for your help and information. Jos

POSTED BY: Jos Klaps

I am uploading a notebook (generated in Mathematica 7) that does what I think you wish to see. My apologies for not reusing your notebook, because it exhibits instability (mostly hangs, or errors due to the Row["\ntime...] I think) on my laptop.

The overall idea is the same (as I understood it). Given a dataset, I plot the dataset and overlay a moving average of n-elements chosen from a subset of dataset ranging from a to b. In the sample, I enable tooltip for both the raw dataset and the moving average. I hope this is helpful. Thank you.

POSTED BY: Isaac Abraham

Hi Isaac, No, I want the Tooltip on the peaks of the back line only (not red line) but can't find it how to handle. See MMA9 attached file in my previous note. Thanks. Jos

POSTED BY: Jos Klaps

On my Mathematica 7, the notebook without Row["\ntime...] worked correctly. Did you wish to add a tooltip like so - this one shows the averaging days "m" when you mouse over the red line.

Tooltip[ Line@Transpose[{Range[a, b, (b - a)/(Length[mm] - 1)], mm}], ToString[m]]
POSTED BY: Isaac Abraham

Sorry, I forgot to attach the file. Thanks. Jos

POSTED BY: Jos Klaps

Thanks for your quick reply and let me know about the bug. My question to tooltip is; can I use and where add 'tooltip' of the data "datafreq" in the plot? Jos

POSTED BY: Jos Klaps

Where do you want a Tooltip? There isn't an example in the code of where you've tried this. If you are wanting it to be in the PlotLabel where you indicate then replace the PlotLabel expression by

PlotLabel -> 
 Tooltip[Style["Test with Tooltip", "Title", 12], "This is a tooltip"]

Also there's a bug in the notebook you posted. Replace

"\ntime span:"


Row[{"\ntime span:"}]

Otherwise the bottom two sliders do not work.

Let me know if these are the things you are asking. If not, let me know as well ;-)

POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract