Login  Register

Re: IJ1 macro: how to get coordinates from a plot that contains more than one (x,y) curve?

Posted by Jerome Mutterer-3 on Feb 09, 2016; 11:20am
URL: http://imagej.273.s1.nabble.com/IJ1-macro-how-to-get-coordinates-from-a-plot-that-contains-more-than-one-x-y-curve-tp5015577p5015579.html

Bonjour Christophe.
This javascript recovers the results table from a plot:

win = IJ.getImage().getWindow();
if (win instanceof PlotWindow) {
plot= win.getPlot();
rt = plot.getResultsTable(true);
rt.show("plot data");
}

Sincerely,

Jerome.




On 9 February 2016 at 11:37, Christophe Leterrier <
[hidden email]> wrote:

> Also, clicking "List" or "Save" in the Plot window does not register
> anything in the macro/JS recorder. How can I access the Plot values from a
> macro or JS?
>
> Christophe
>
> On Tue, Feb 9, 2016 at 11:29 AM, Christophe Leterrier <
> [hidden email]> wrote:
>
> > Hi,
> >
> > I'm trying to get the values of a plotted curve that is generated by a
> > plugin I have no control over. There are several points and curves,
> > resulting in a table with seven columns (X0, Y0, Y1, X2, Y2, X3, Y3)
> when I
> > hit the "List" button. When I try to do this in a macro using
> > the Plot.getValues(xpoints, ypoints) function (which according to the
> > documentation "Returns the values displayed by clicking on "List" in a
> plot
> > or histogram window "), I get only the two first columns of the table (X0
> > and Y0). Is there a way to get arrays with the values in the other
> columns
> > via a macro function?
> >
> > Thanks,
> >
> > Christophe
> >
> > --
> > Christophe Leterrier
> > Researcher
> > Axonal Domains Architecture Team
> > CRN2M CNRS UMR 7286
> > Aix Marseille University, France
> >
> >
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Jerome Mutterer
CNRS - Institut de biologie moléculaire des plantes
12, rue du Général Zimmer
67084 Strasbourg Cedex
www.ibmp.cnrs.fr

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html