Re: PlotWindow Mouse moved

Posted by Gerhard-5 on
URL: http://imagej.273.s1.nabble.com/PlotWindow-Mouse-moved-tp3700512p3700513.html

Wayne Rasband wrote:

>> Hello,
>> does anyone know how I can retrieve the current X and Y values in a
>> PlotWindow when the mouse is moved over a plot.
>
>
> In a plugin you can us code something like this (untested):
>
>     ImageCanvas ic = imp.getCanvas();
>     Point p = ic.getCursorLoc();
>     Calibration cal = imp.getCalibration();
>     double x = cal.getX(p.x);
>     double y = cal.getY(p.y, imp.getHeight());
>
> -wayne
>
Thanks Wayne,
Reading through the code I think this is not exactly what I need.
I need the X and Y Values shown at the bottom of the PlotWindow when the
mouse is moved over the plot.
This two values are depending on the limits set for the plot.

Thanks
Gerhard