AXIS

The AXIS procedure draws an axis of the specified type and scale at a given position. The new scale is saved for use by subsequent overplots if the SAVE keyword parameter is set. The keyword parameters XAXIS, YAXIS, and ZAXIS specify the type of axis to be drawn, and its position.

Calling Sequence

AXIS [[[, X], Y], Z]

Arguments

X, Y, and Z

Scalars giving the starting coordinates of the new axis. If no coordinates are specified, the axis is drawn in its default position as given by the [XYZ]AXIS keyword. When drawing an X axis, the X coordinate is ignored, similarly the Y and Z parameters are ignored when drawing their respective axes (i.e., new axes will always point in the correct direction).

Keywords

SAVE

Set this keyword to indicate that the scaling to and from data coordinates established by the call to AXIS is to be saved in the appropriate axis system variable, !X, !Y, or !Z. If this keyword is not present, the scaling is not changed.

XAXIS

Set this keyword to draw an X axis. If the X parameter is not present, setting XAXIS equal to 0 draws an axis under the plot window with the tick marks pointing up, and setting XAXIS equal to one draws an axis above the plot window with the tick marks pointing down. If the X parameter is present, the X axis is positioned accordingly, and setting XAXIS equal to 0 or 1 causes the tick marks to point up or down, respectively.

YAXIS

Set this keyword to draw a Y axis. If the Y parameter is not present, setting YAXIS equal to 0 draws an axis on the left side of the plot window with the tick marks pointing right, and setting YAXIS equal to one draws an axis on the right side of the plot window with the tick marks pointing left. If the Y parameter is present, the Y axis is positioned accordingly, and setting YAXIS equal to 0 or 1 causes the tick marks to point right or left, respectively.

ZAXIS

Set this keyword to draw a Z axis. If the Z parameter is not present, setting ZAXIS has the following meanings:

If the Z parameter is present, the Z axis is positioned accordingly, and setting ZAXIS equal to 0 or 1 causes the tick marks to point left or right, respectively.

Note that AXIS uses the 3D plotting transformation stored in the system variable field !P.T.

XLOG

Set this keyword to specify a logarithmic X axis

YNOZERO

Set this keyword to inhibit setting the minimum Y axis value to zero when the Y data are all positive and non-zero, and no explicit minimum Y value is specified (using YRANGE, or !Y.RANGE). By default, the Y axis spans the range of 0 to the maximum value of Y, in the case of positive Y data. Set bit 4 in !Y.STYLE to make this option the default.

YLOG

Set this keyword to specify a logarithmic Y axis.

Graphics Keywords Accepted

See , Graphics Keywords , for the description of graphics and plotting keywords not listed above. CHARSIZE

Example

The following example shows how the AXIS procedure can be used with normal or polar plots to draw axes through the origin, dividing the plot window into four quadrants:

PLOT, /POLAR, XSTYLE=4, YSTYLE=4, TITLE='Polar Plot', r, theta
; Make the plot, polar in this example, and suppress the X and Y axes using the XSTYLE and YSTYLE keywords.

AXIS,0,0,XAX=0,/DATA ; Draw an X axis, through data Y coordinate of 0. Because the XAXIS keyword parameter has a value of 0, the tick marks point down.

AXIS,0,0,0,YAX=0,/DATA ; Similarly, draw the Y axis through data X = 0. The tick marks point left.

See Also

LABEL_DATE , PLOT