Using Tooltip
, is it possible to display the numeric value of the curve I've plotted using Plot
and PolarPlot
?
For example, is it possible to display the numeric y value of Sin[x]
(or any other curve) with Tooltip
?
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityUsing Tooltip
, is it possible to display the numeric value of the curve I've plotted using Plot
and PolarPlot
?
For example, is it possible to display the numeric y value of Sin[x]
(or any other curve) with Tooltip
?
I thought I did something like the following before, but maybe it was not for this site:
DynamicModule[{y0},
EventHandler[
Plot[Tooltip[Sin[x], Dynamic[y0]], {x, 0, 2 Pi}],
"MouseMoved" :> (y0 = Sin@First@MousePosition["Graphics"]),
]]
Plot[Tooltip[Sin[x], Dynamic@MousePosition["Graphics"]], {x, 0, 2 Pi}]
$\endgroup$
– Kuba♦
Jul 14 '16 at 18:38
Potential way to achieve this:
pl = Plot[Sin[x], {x, 0, 10}];
vals = Table[Tooltip[{x, Sin[x]}, Sin[x]], {x, 0, 10, .05}];
lp = ListPlot[vals, PlotStyle -> None];
Show[{pl, lp}]