plot functions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

plot functions

Winnok H. De Vos
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
______
ir. Winnok De Vos
Research Assistant

dep. Molecular Biotechnology
Faculty of Bioscience Engineering
Ghent University
Coupure links 653
9000 Ghent
Belgium

tel 0032.(0)9.264.59.71
fax 0032.(0)9.264.62.19
www.molecularbiotechnology.ugent.be
Reply | Threaded
Open this post in threaded view
|

Re: plot functions

Michael Schmid
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
Reply | Threaded
Open this post in threaded view
|

Re: plot functions

Winnok H. De Vos
Hello Michael,

Thanks for your reply.
I am working with macro scripting. But, come to think of it, I could use the
Plot.addText command in an analogous way you described (coordinates
relatively scaled), although this seems a bit tedious. There is no direct
macro command for labeling data points?
Regards,

winnok


______
ir. Winnok De Vos
Research Assistant

dep. Molecular Biotechnology
Faculty of Bioscience Engineering
Ghent University
Coupure links 653
9000 Ghent
Belgium

tel 0032.(0)9.264.59.71
fax 0032.(0)9.264.62.19
www.molecularbiotechnology.ugent.be
----- Original Message -----
From: "Michael Schmid" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, May 30, 2007 3:48 PM
Subject: Re: plot functions


> 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
>