Group Abstract Group Abstract

Message Boards Message Boards

0
|
8.5K Views
|
5 Replies
|
1 Total Like
View groups...
Share
Share this post:

Why is Tooltip not working in Manipulate?

Posted 10 years ago

Dear All,

Please can you help !

Probably a simple question, but why is tooltip not working in the Manipulate code? See also attached file 'with' and without 'Tooltip'.

Manipulate[Tooltip[
  L = Length@datafreqt];
 mm = MovingAverage[datafreqt[[ Range[a, b] ]], m];
 If[L - 1 > a >= b, b = a + 1];
 If[a === L, a = L - 1; b = L];
 If[m > b - a, m = b - a];

 Pane[
  Graphics[
   {Thin, GrayLevel[.5], Line@Transpose[{Range@L, datafreqt}]
    , Thick
    , Red
    , Line@Transpose[
      {Range[a, b, (b - a)/(Length[mm] - 1)],
       mm}]}
   , PlotLabel -> Style["Test with TOOLTIP", "Title", 12]
   , BaseStyle -> {FontFamily -> "Arial", FontWeight -> "Bold", 
     FontSize -> 11}
   , Frame -> True
   , FrameLabel -> {"Test [%]", "Test [n]"}
   , GridLines -> Automatic
   , GridLinesStyle -> Directive[Black, Dotted]
   , PlotRange -> {{0, 101}, {0, 200}}
   , AspectRatio -> .5
   , Axes -> True
   , Ticks -> {None, Automatic}]
  , ImageSize -> 350]
 , {{m, 1, "m\[Hyphen]day moving average"}, 1, Max[b - a, 1], 1, 
  Appearance -> "Labeled"}
 , "time span:"
 , {{a, Floor[.25 L], "lower limit"}, 1, L, 1, Appearance -> "Labeled"}
 , {{b, Floor[.75 L], "upper limit"}, 1, L, 1, Appearance -> "Labeled"}
 , SaveDefinitions -> True
 , TrackedSymbols -> True

 ]
Attachments:
POSTED BY: Jos Klaps
5 Replies
POSTED BY: Michael McCain

Hi Michael,

Many thanks for your help. The code with 'ListPlot - Tooltip' seems fine for me.

Again, thanks for your time and excellent support !

Cheers,....Jos

POSTED BY: Jos Klaps

Hi Michael,

Thanks for your reply and help.

Here some more details. The tooltip should show the peak data, simular as in the Scatterplot bellow. Do you know if this is possible in Manipulate?

scatterplot = 
 ListPlot[Tooltip[datafreq], AxesLabel -> {"Test", "Test"},
  PlotStyle -> Directive[PointSize[Small], Blue],
  Filling -> Axis] 

Many thanks for your help !

File attached: Test with Tooltip_2.nb

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