Re: Dynamic PlotLabel in Math6?
- To: mathgroup at smc.vnet.net
- Subject: [mg77224] Re: Dynamic PlotLabel in Math6?
- From: Pratik Desai <pratikd at wolfram.com>
- Date: Wed, 6 Jun 2007 06:42:33 -0400 (EDT)
- References: <f2el71$25e$1@smc.vnet.net>
On May 16, 5:08 am, "W. Craig Carter" <ccar... at mit.edu> 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
Hello Craig,
I think one possible way to do this is just to tweak your code a
little bit by moving the Dynamic out.
Dynamic@Plot[{Annotation[Sin[x], "Sine", "Mouse"],
Annotation[Cos[x], "Cosine", "Mouse"]}, {x, 0, 2 \[Pi]},
PlotStyle -> Thick, PlotLabel -> MouseAnnotation[]]
And this works.
Hope this helps
Sincerely,
Pratik Desai
- Follow-Ups:
- Re: Re: Dynamic PlotLabel in Math6?
- From: Murray Eisenberg <murray@math.umass.edu>
- Re: Re: Dynamic PlotLabel in Math6?