Login  Register

Why does this only make one plot window?

Posted by George W. Sherouse, Ph.D. on Jul 30, 2007; 2:09am
URL: http://imagej.273.s1.nabble.com/Why-does-this-only-make-one-plot-window-tp3698758.html

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
===========================