Re: plot functions
Posted by Michael Schmid on May 30, 2007; 2:48pm
URL: http://imagej.273.s1.nabble.com/plot-functions-tp3699280p3699281.html
Hi Winnok,
if you are writing a plugin (not a macro), you could use
myPlot.addLabel(double x, double y, String label)
you have to scale x and y however, addLabel expects coordinates
between 0 and 1.
x = (xdata-xmin)/(xmax-xmin);
and the same for y, where xmax, xmin is the data range of the
plot and xdata is the x-coordinate where you want the label.
To get xmin, xmax, ymin, ymax you could use
ij.util.Tools.getMinMax(data)
with the data arrays that you submit to the plot function.
Michael
________________________________________________________________
On 30 May 2007, at 12:24, winnok ugent wrote:
> Dear all
>
> A small question on plotting values in imageJ. Is there a
> possibility of adding labels to the plotted points (at the markers)?
> Thanks in advance.
> Kind regards,
> winnok