Language Reference |
draw a horizontal or vertical axis
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-1).
The default is X
.
{minimum-x minimum-y maximum-x maximum-y} |
{minimum-x minimum-y maximum-x maximum-y} |
The GXAXIS subroutine draws a horizontal axis; the GYAXIS subroutine draws a vertical axis. The first three arguments are required.
The starting-point argument is a matrix
of two numbers given in world coordinates.
The matrix is the starting point of the axis.
The length argument is a scalar value
giving the length of the axis or
axis in
world coordinates along the
or
direction.
The nincr argument is a scalar value giving the number of major tick marks shown on the axis. The first tick mark is on the starting point as specified.
The axis routines 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 containing 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 routines
to get more precise scaling and labeling.
For example, suppose you want to draw the axis
for and
.
The following code draws these axes.
Each axis is 4 units long.
Note that 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 noticklab option is turned off,
so that the tick marks are not labeled.
call gport({20 20 80 80}); call gwindow({-2 -2 2 2}); call gxaxis({-2,0},4,5,2,1); call gyaxis({0,-2},4,5,2,1);
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.