Re: Dynamic PlotLabel in Math6?
- To: mathgroup at smc.vnet.net
- Subject: [mg76224] Re: Dynamic PlotLabel in Math6?
- From: Albert <awnl at arcor.net>
- Date: Fri, 18 May 2007 06:07:11 -0400 (EDT)
- References: <f2el71$25e$1@smc.vnet.net>
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 Looks like changing the PlotLabel directly is not possible, presumably because the information is just in the options of the Graphics. But there are workarounds (for me for some reason the AspectRatio changes with the first version): FullGraphics[Plot[{ Annotation[Sin[x], "Sine", "Mouse"], Annotation[Cos[x], "Cosine", "Mouse"] }, {x, 0, 2 \[Pi]}, PlotStyle -> Thick, PlotLabel :> Dynamic[MouseAnnotation[]] ]] or: Grid[{{ Style[ Dynamic[MouseAnnotation[] /. Null -> "Empty Space"], FontFamily -> "Helvetica" ]}, {Plot[{ Annotation[Sin[x], "Sine", "Mouse"], Annotation[Cos[x], "Cosine", "Mouse"] }, {x, 0, 2 \[Pi]}, PlotStyle -> Thick ] }}, ItemSize -> {Automatic, {2, All}} ] hth, albert
- Follow-Ups:
- Re: Re: Dynamic PlotLabel in Math6?
- From: "Lev Bishop" <lev.bishop+mathgroup@gmail.com>
- Re: Re: Dynamic PlotLabel in Math6?