CALL GXAXIS
(starting-point, length, nincr <*>, nminor <*>, noticklab <*>, format <*>, height <*>, font <*>, color <*>, fixed-end <*>,
window <*>, viewport ) ;
CALL GYAXIS
(starting-point, length, nincr <*>, nminor <*>, noticklab <*>, format <*>, height <*>, font <*>, color <*>, fixed-end <*>,
window <*>, viewport ) ;
The GXAXIS subroutine is a graphical call that draws a horizontal axis. The GYAXIS subroutine draws a vertical axis. This call is part of the traditional graphics subsystem, which is no longer being developed.
The required arguments to the GXAXIS and GYAXIS subroutines are as follows:
is the starting point of the axis, specified in world coordinates.
is a numeric scalar that contains the length of the axis, specified in world coordinates.
is a numeric scalar that contains the number of major tick marks on the axis. The first tick mark corresponds to starting-point.
The optional arguments to the GXAXIS and GYAXIS subroutines are as follows:
is an integer that specifies the number of minor tick marks between major tick marks.
is a flag that is nonzero if the tick marks are not labeled. The default is to label tick marks.
is a character scalar that specifies a valid SAS numeric format used in formatting the tick-mark labels. The default format is 8.2.
is a numeric matrix or literal that specifies the character height. This is used for the tick-mark labels.
is a character matrix or quoted literal that specifies a valid font name. This is used for the tick-mark labels.
is a valid color. The color argument 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.
holds one end of the scale fixed. 'U' fixes the upper end; 'L' fixes the lower end; 'X' allows both ends to vary from the data values. In addition, you can specify 'N', which causes the axis routines to bypass the scaling routine. The interval between tick marks is length divided by (nincr). The default is 'X'.
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 GXAXIS and GYAXIS subroutines use the same scaling algorithm as the GSCALE subroutine. For example, if the starting point is 10 and the length of the axis is 44, and if you call the GSCALE subroutine with the vector that contains the two elements, 10 and 44, the scale obtained should be the same as that obtained by the GXAXIS subroutine. Sometimes, it can be helpful to use the GSCALE subroutine in conjunction with the axis subroutines to get more precise scaling and labeling.
For example, suppose you want to draw the axis for and . The following statements draw these axes. Each axis is four units long. The axis begins at the point , and the axis begins at the point . The tick marks can be set at each integer value, with minor tick marks in between the major tick marks. The tick marks are labeled because the noticklab option has the value 0.
call gstart; call gport({20 20 80 80}); call gwindow({-2 -2 2 2}); call gxaxis({-2,0}, 4, 5, 2, 0); call gyaxis({0,-2}, 4, 5, 2, 0); call gshow;