Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Tooltip in a Plot of a List

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115700] Re: Tooltip in a Plot of a List
  • From: blamm64 <blamm64 at charter.net>
  • Date: Tue, 18 Jan 2011 05:53:47 -0500 (EST)
  • References: <iguiqp$8t7$1@smc.vnet.net> <ih168o$jga$1@smc.vnet.net>

On Jan 17, 5:39 am, Albert Retey <a... at gmx-topmail.de> wrote:
> 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- Hide quoted text -
>
> - Show quoted text -

Thanks Albert, your suggestion is spot on.
I'm embarrassed a bit as well.
-Brian L.


  • Prev by Date: Problems Exporting to PDF
  • Next by Date: Re: MathLink with Mathematica Home Edition 8.0
  • Previous by thread: Re: Tooltip in a Plot of a List
  • Next by thread: Help on compiling a function