Login  Register

Re: Why does this only make one plot window?

Posted by Justin McGrath on Jul 30, 2007; 6:02am
URL: http://imagej.273.s1.nabble.com/Why-does-this-only-make-one-plot-window-tp3698758p3698759.html

Use Plot.show() after you create the plot or it will only be called
once at the end of the macro.

Justin

On 7/29/07, George W. Sherouse, Ph.D. <[hidden email]> wrote:

> macro "Plot Central Profiles" {
> //     requires("1.30k");
> //     getCursorLoc(x,y,z,mod);
> //     doWand(x,y);
>
>       getSelectionBounds(x, y, width, height)
>
>      // Get X profile
>       x1 = x - width;
>       x2 = x + (2 * width);
>       y1 = y + (height / 2.0);
>       makeLine(x1,y1,x2,y1);
>
>       xprofile = getProfile();
>
>       // Get Y profile
>       x1 = x + (width / 2.0);
>       y1 = y - height;
>       y2 = y + (2 * height);
>       makeLine (x1,y1,x1,y2);
>
>       yprofile = getProfile();
>
>      // Plot profiles
>      Plot.create("X Profile", "X", "Dose", xprofile);
>      Plot.create("Y Profile", "Y", "Dose", yprofile);
> }
>
>
> ======================================================
> Sherouse Systems, Inc., Chapel Hill, NC, <http://www.gwsherouse.com/>
> Medical Physics and Computing services for Radiation Oncology
> (919) 382-8102 voice or FAX, <mailto:[hidden email]>
>
> One who speaks does not know.  One who knows does not speak.
> - Lao Tzu
> ===========================
>