Re: How to resolve "no plot window"
Posted by
Wayne Rasband-2 on
Jun 07, 2019; 11:45pm
URL: http://imagej.273.s1.nabble.com/How-to-resolve-no-plot-window-tp5022234p5022238.html
On Jun 7, 2019, at 9:03 AM, fieryice12 <
[hidden email]> wrote:
>
> I am writing a macro to batch process multiple files in a folder. When I run
> this code, I'm getting the error message "No plot window in line 6". What is
> causing this and how can it be fixed?
This is a batch mode bug that is fixed in the latest daily build (1.52p45). You also need to change the statement that saves the table to
saveAs("Results", output + filename + ".csv”);
or you will not be able to open the table in ImageJ.
-wayne
> function action(output, filename)
> {
> open(input + filename);
> makeRectangle(75, 47, 40, 42);
> run("Plot Z-axis Profile", "profile=time");
> Plot.showValues();
> saveAs("Results", output + filename);
> close();
> }
>
> input = "C:/Users/Admin/Desktop/Input/";
> output = "C:/Users/Admin/Desktop/Output/";
>
> setBatchMode(true);
> list = getFileList(input);
> for (i = 0; i < list.length; i++)
> {
> action(output, list[i]);
> }
> setBatchMode(false);
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html