CALL GGRID
(x, y <*>, style <*>, color <*>, window <*>, viewport ) ;
The GGRID subroutine is a graphical call that draws a grid on a graphical window. The required arguments to the GGRID subroutine are as follows:
is a vector of points that contains the horizontal coordinates of the grid lines.
is a vector of points that contains the vertical coordinates of the grid lines.
The optional arguments to the GGRID subroutine are as follows:
is a numeric matrix or literal that specifies an index that corresponds to a valid line style.
is a valid SAS color, where color can be specified as a quoted text string (such as 'RED'), the name of a character matrix that contains a valid color as an element, or a color number (such as 1) that refers to a color in the color list.
is a numeric matrix or literal that specifies a window. This is given in world coordinates and has the form
{minimum-x minimum-y maximum-x maximum-y} |
is a numeric matrix or literal that specifies a viewport. This is given in normalized coordinates and has the same form as the window argument.
The GGRID subroutine draws a sequence of vertical and horizontal lines specified by the x and y vectors, respectively. The start and end of the vertical lines are implicitly defined by the minimum and maximum of the y vector. Likewise, the start and end of the horizontal lines are defined by the minimum and maximum of the x vector. The grid lines are drawn in the same color and line style. The coordinates in use for this graphics command are world coordinates.
For example, use the following statements to place a grid in the lower left corner of the screen:
call gstart; x={10, 20, 30, 40, 50}; y=x; /* Places a grid in the lower left corner of the screen, */ /* assuming the default window and viewport */ call ggrid(x,y); call gshow;