I'm trying to add popupwindows to tooltips for points on an ErrorListPLot but all the popupwindows appear on screen immediately when I run the command below that plots the graph.
After closing all the popupwindows the tooltips and popupwindows work as intended, so when I hover over the points in the plot I get the right tooltip, and when I click on the points I get the popupwindow. I thought I was missing a semicolon somewhere but I think it is more basic then that.
The tooltips are unique for each point so they are indexed in a loop, but this simplified example illustrates the problem with the popupwindows appearing prior to clicking on the points.
I'm sure there must be an amazingly concise and elegant fix using # & and @ characters amongst others but I am a complete novice in need of enlightenment! Thanks for taking the time to read this.
xyPoints= {{{-152., 1.428}, {-83.9858, 1.88051}, {-84.,
2.066}, {-133.466, 1.76653}}, {{-152., 1.428}, {-83.9858,
1.88051}}, {}, {}, {}, {}, {}, {}, {}, {}}
errorBars= {{ErrorBar[{-86.0233, 86.0233}, {-0.07, 0.07}],
ErrorBar[{-70.3562, 70.3562}, {-0.0494975, 0.0494975}],
ErrorBar[{-111.803, 111.803}, {-0.1, 0.1}],
ErrorBar[{-81.7902, 81.7902}, {-0.0647275,
0.0647275}]}, {ErrorBar[{-86.0233, 86.0233}, {-0.07, 0.07}],
ErrorBar[{-70.3562, 70.3562}, {-0.0494975,
0.0494975}]}, {}, {}, {}, {}, {}, {}, {}, {}}
test = Table[
Table[{PopupWindow[
Tooltip[Transpose[{xyPoints[[i]], errorBars[[i]]}][[j]],
Grid[{{"Tooltip hello"}}, Alignment -> Left, Frame -> All],
TooltipStyle -> Medium],
Pane[Grid["Popup hello"], Scrollbars -> True,
ImageSize -> {650, 400}], WindowSize -> {700, 450}]
}, {j, Range[Length[errorBars[[i]]]]}],
{i, Range[maxSeries]}];
ErrorListPlot[test[[1]]]
maxSeries
is not defined. Also take your time to format your question, see: mathematica.stackexchange.com/help/formatting $\endgroup$Needs["ErrorBarPlots`"]; ErrorListPlot[{PopupWindow[{{10, 20}, ErrorBar[5]}, "hi!"]}]
$\endgroup$