Re: Tooltip in a Plot of a List
- To: mathgroup at smc.vnet.net
- Subject: [mg115644] Re: Tooltip in a Plot of a List
- From: Albert Retey <awnl at gmx-topmail.de>
- Date: Mon, 17 Jan 2011 05:39:15 -0500 (EST)
- References: <iguiqp$8t7$1@smc.vnet.net>
Am 16.01.2011 11:55, schrieb blamm64: > I've searched around here on "Tooltip" but could not find quite what I > was looking for. > > I have a list: > > Dimensions[masterList] > {24,23,3} > > masterList contains some results of submitting 24 cases to NDSolve. > Each case runs NDSolve 23 times, and for each of those 23 runs I > gather in a list of length 3 (an input angular acceleration, the rpm > at which a certain event occurs, and the elapsed time to the event). > > When I do > > ListLinePlot[Evaluate[Table[(#[[{1,2}]]&)/@masterList[[i]],{i, > {23,24}}]],AxesOrigin->{0,1500},InterpolationOrder->2] > > I get what I want: cases 23 and 24 are are graphed in one plot > (acceleration abscissa, rpm ordinate). Using > First@Dimensions[masterList] in place of {23,24} gives all 24 cases > graphed in one plot, again just what I want. > > When I wrap Tooltip around the Evaluate I get (after a couple of > warnings) the coordinates when I hover the mouse over a particular > curve, which is what I do not want. I want the displayed Tooltip to > be <i>, no matter where I hover the mouse over any one graph in the > plot. > > I have tried several other naive things to no avail. > > Any ideas on how to get what I want (even if it's not using Tooltip) > would be greatly appreciated. is this too naive? It seem to do what you want for my random example data :-) ListLinePlot[ Evaluate[Table[ Tooltip[(#[[{1, 2}]] &) /@ masterList[[i]], i], {i, {23, 24}}]], InterpolationOrder -> 2] hth, albert