Login  Register

Re: Error identifying Plot window

Posted by Rasband, Wayne (NIH/NIMH) [E] on Nov 28, 2011; 1:14am
URL: http://imagej.273.s1.nabble.com/Error-identifying-Plot-window-tp3682430p3682432.html

On Nov 27, 2011, at 6:28 PM, Norbert Vischer wrote:

> When I run the macro below, I get an error after the first few runs.
> getImageID does not correctly return the ID of the plot window. Is there any fix or work-around?

There was a plot window timing problem that is fixed in the ImageJ 1.46b daily build.

-wayne

>
> Norbert Vischer
>
>
> run("Close All");
> run("Blobs (25K)");
> srcID = getImageID;
>
> for (jj = 0; jj < 100; jj++){
> selectImage(srcID);
> yValues = newArray(2, 2.8, 4, 5.6, 8);
> Plot.create("Simple Plot", "X", "Y", yValues);
> Plot.show;
> plotID = getImageID;
> if (srcID == plotID)
> exit("Error: srcID == plotID; jj =" + jj);
> close;
> }