|
Hello,
I am trying write a simple macro that will create a plot and then close the plot window. This is the code I have:
R=nResults();
yValues=newArray(R);
for(i=0;i<R;i++)
{
yValues[i]=getResult('Mean',i);
}
xValues=newArray(0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80.85,90,95,100,105,110,115,120,125,130);
Plot.create("test","time (s)", "green intensity",xValues,yValues);
selectWindow("test");
close();
For some reason it wants to run the "selectWindow" command before creating the plot. If I run the first part of the code to create the plot, and then run the second part to close the window, it works fine, so I know the problem is it is running the code out of order. This should be simple and it will save me from making mistakes during my analysis. My goal is to insert this bit of code into a macro that I wrote for batch processing so that I can watch the analysis as it goes to make sure my macro is working the same on all of my images. Any help would be greatly appreciated.
|