Re: Re: Mouse-Over or Mouse-Click Values of Coordinates in
- To: mathgroup at smc.vnet.net
- Subject: [mg103697] Re: [mg103642] Re: Mouse-Over or Mouse-Click Values of Coordinates in
- From: Gregory Lypny <gregory.lypny at videotron.ca>
- Date: Sat, 3 Oct 2009 09:00:36 -0400 (EDT)
- References: <20091002073041.0JI24.175128.imail@eastrmwml41>
Thank you, Bob and Nasser.
Bob, if I understand correctly, the three arguments of Text that you
use in Epilog are expression, coordinates, and offset: expression (pt,
which is the figures of the coordinates to be displayed), coordinates
(pt again to center the figures at the point), and offset (1.25 Sign
[a] {1, 1}, to make it look good).
Text[pt, pt, 1.25 Sign[a] {1, 1}]}]
G.
On Fri, Oct 2, 2009, at 7:30 AM, Bob Hanlon wrote:
>
> Manipulate[
> b = Round[a, .001];
> pt = {b, Round[Sin[b], .001]};
> Plot[Sin[x], {x, -Pi, Pi},
> Epilog -> {Red,
> PointSize[Medium],
> Point[pt], Black,
> Text[pt, pt,
> 1.25 Sign[a] {1, 1}]}],
> {a, -Pi, Pi, Pi/100,
> Appearance -> "Labeled"}]
>
>
> Bob Hanlon
>
> ---- Nasser Abbasi <nma at 12000.org> wrote:
>
> =============
>
> "Gregory Lypny" <gregory.lypny at videotron.ca> wrote in message
> news:h9srm3$p3g$1 at smc.vnet.net...
>> Hello everyone,
>>
>> Is there a way to include in Manipulate something like a tooltip,
>> where the coordinates of a point in a plot appear where the user
>> clicks.
>>
>> Regards,
>>
>> Gregory
>>
>
> I know how to do it with discrete data. Here is an example
>
> data = Table[Tooltip[Sin[x]], {x, -Pi, Pi, Pi/100.}];
> ListPlot[data, Joined -> True]
>
> And now if you move the mouse over the plot, the y-value (i.e. sin
> (x) )
> value will be displayed, here is a screen shot
> http://12000.org/tmp/093009/tooltip.PNG
>
> But with the direct plot command, I still can't figure it
>
> Plot[Tooltip[Sin[x]], {x, -Pi, Pi}]
>
> will display "Sin[x]", instead of the current value of it. As shown
> here:
> http://12000.org/tmp/093009/tooltip2.PNG
>
> I tried using Dynamics and Annotation with Mousover to get it to
> work, but
> no luck. I am sure some Mathematica expert here will have an answer
> on how
> to do it with a direct plot command instead of discrete plot.
>
> --Nasser
>
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4470 (20090930) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>