Reference Guide > A Routines > AXIS Procedure
  

AXIS Procedure
Draws an axis of the specified type and scale at a given position.
Usage
AXIS [[[, x], y], z]
Input Parameters
x, y, and z—(optional) Scalars giving the coordinates of the new AXIS.
Keywords
XAxis—Specifies how the x-axis is to be drawn:
*0—Draws an axis under plot window, with the tick marks pointing up.
*1—Draws an axis over the window, with tick marks pointing down.
YAxis—Specifies how the y-axis is to be drawn:
*0—Draws a y-axis at the left of the plot window, with tick marks pointing to the right.
*1—Draws a y-axis at the right of the plot window, with tick marks pointing to the left.
ZAxis—Specifies how the z-axis is to be drawn:
*1—Lower-right
*2—Lower-left
*3—Upper-left
*4—Upper-right
Additional keywords let you control many aspects of the plot’s appearance. Additional plotting keywords are listed below. For a description of each keyword, see Graphics and Plotting Keywords.
 
 
 
Save—Indicates 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 not present, the scaling is not changed.
Discussion
If no coordinates are specified, the axis is drawn in its default position as given by the XAxis, YAxis or ZAxis keyword. When drawing an x-axis, the x-coordinate is ignored. Similarly, the y and z parameters are ignored when drawing their respective axes.
The new scale is saved for use by subsequent overplots if the Save keyword is present.
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:
theta = FINDGEN(361) * !Dtor
PLOT, /Polar, XStyle=4, YStyle=4, Title='Nine-Leaved Rose', $
   5 * COS(9 * theta), theta
WAIT, 2
; Draw an x-axis through data y-coordinate of 0. Because the 
; XAxis keyword has a value of 0, the tick marks point down. 
AXIS, 0, 0, XAxis=0, /Data
WAIT, 2
; Similarly, draw the y-axis through data x-coordinate of 0.
AXIS, 0, 0, 0, YAxis=0, /Data

Version 2017.1
Copyright © 2019, Rogue Wave Software, Inc. All Rights Reserved.