Login  Register

Why does this only make one plot window?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Why does this only make one plot window?

George W. Sherouse, Ph.D.
3 posts
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
===========================
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Why does this only make one plot window?

Justin McGrath
72 posts
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
> ===========================
>