Login  Register

Error identifying Plot window

Posted by Norbert Vischer on Nov 27, 2011; 11:28pm
URL: http://imagej.273.s1.nabble.com/Error-identifying-Plot-window-tp3682430.html

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?

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