Language Reference |
GWINDOW Call |
The GWINDOW subroutine sets up the window for scaling data values in subsequent graphics primitives. The argument window is a numeric matrix or literal that specifies a window. The rectangular area’s boundary is given in world coordinates, where you specify the lower left and upper right corners in the form
{minimum-x minimum-y maximum-x maximum-y} |
The window remains until the next GWINDOW call or until the segment is closed. The coordinates in use for this graphics command are world coordinates. An example that uses the GWINDOW subroutine follows:
x = rannor( j(20,1) ); y = 3 + x + 0.5*rannor( j(20,1) ); call gstart; /* define window to contain the data range plus 5% margins */ xMargin = 0.05*(max(x) - min(x)); yMargin = 0.05*(max(y) - min(y)); wd = (min(x)-xMargin) || (min(y)-yMargin) || (max(x)+xMargin) || (max(y)+yMargin); call gwindow(wd); call gpoint(x, y); call gshow;
Copyright © SAS Institute, Inc. All Rights Reserved.