Re: Dynamic PlotLabel in Math6?
- To: mathgroup at smc.vnet.net
- Subject: [mg76179] Re: Dynamic PlotLabel in Math6?
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Thu, 17 May 2007 06:03:20 -0400 (EDT)
- Organization: Uni Leipzig
- References: <f2el71$25e$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
Hi,
try
Plot[{Annotation[Sin[x], "Sine", "Mouse"],
Annotation[Cos[x], "Cosine", "Mouse"]}, {x, 0, 2 \[Pi]},
PlotStyle -> Thick, PlotLabel :> Dynamic[MouseAnnotation[]]]
and a *second* time in your notebook
Plot[{Annotation[Sin[x], "Sine", "Mouse"],
Annotation[Cos[x], "Cosine", "Mouse"]}, {x, 0, 2 \[Pi]},
PlotStyle -> Thick, PlotLabel :> Dynamic[MouseAnnotation[]]]
now move the mouse over the curves in the second picture and observe
that the plot label in the *first* picture changes ...
Regards
Jens
W. Craig Carter wrote:
> It would be convenient if this construction would work in
> math6:
> Plot[{Annotation[Sin[x], "Sine", "Mouse"], Annotation[Cos[x], "Cosine", "Mouse"]}, {x, 0, 2 \[Pi]},
> PlotStyle -> Thick, PlotLabel -> Dynamic[MouseAnnotation[]]]
> (i.e., use the label as a dynamic legend)
>
> This kind of works, if you know a priori to click and
> pull up the pop-up window:
> PopupWindow[
> Plot[{Annotation[Sin[x], "Sine", "Mouse"],
> Annotation[Cos[x], "Cosine", "Mouse"]}, {x, 0, 2 \[Pi]},
> PlotStyle -> Thick], Dynamic[MouseAnnotation[]]]
>
> Any ideas on how to make the first construction work
> dynamically?
>
> Craig
>