Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

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





  • Prev by Date: Value of E
  • Next by Date: Re: Drowing a vertical or horizontal line in a graphic
  • Previous by thread: Re: Value of E
  • Next by thread: Re: Re: Dynamic PlotLabel in Math6?