Axis

Provides access to tabs in the Axis dialog box. Get and set various axis style parameters.

 

Syntax:

axis [option] [xyzdialog]

Options:

no option, Open the Scale tab of the Specified Axis dialog box

Syntax: axis xyzdialog

Open the Scale tab of the Axis dialog box ...with the X axis selected when xyzdialog is X. ... with the Y axis selected when xyzdialog is Y. ...with the Z axis selected when xyzdialog is Z. Do not use Z if a plot type is not 3D.

axis x; //Open the Scale tab of X axis.

-a; Open the Title tab of the specified Axis dialog box

Syntax: axis -a axis

Open the Title tab of the Axis dialog box for axis. Where axis = X1 (Bottom X), X2 (Top X), Y1 (Left Y), Y2 (Right Y), Z1 (Front Z), and Z2 (Back Z).

axis -a Y2; //Open the Title tab of right Y axis.

-b; Open the Break tab of the specified Axis dialog box

Syntax: axis -b axis

Open the Break tab of the Axis dialog box for axis. Where axis = X or Y. Z is not supported.

axis -b Y; //Open the Break Tab of Y axis.

-g; Open the Grid Lines tab of the specified Axis dialog box

Syntax: axis -g axis

Open the Grid Lines tab of the Axis dialog box for axis. Where axis = X, Y or Z.

-l; Open the Tick Labels tab of the specified Axis dialog box

Syntax: axis -l axis

Open the Tick Labels tab of the Axis dialog box for axis. Where axis = X1 (Bottom X), X2 (Top X), Y1 (Left Y), Y2 (Right Y), Z1 (Front Z), and Z2 (Back Z).

-m; Open the Special Ticks tab of the specified Axis dialog box

Syntax: axis -m axis

Open the Special Ticks tab of the Axis dialog box for axis. Where axis = X1 (Bottom X), X2 (Top X), Y1 (Left Y), Y2 (Right Y), Z1 (Front Z), and Z2 (Back Z).

-pg; Get parameters for the specified axis and place the value of specified type into varName

Syntax: axis -pg axis type varName

Get parameters for the specified axis (X or Y, Z is not supported) and place the value into varName. Where type is one of:

S Scale type: 0 = Linear, 1 = Log10, etc.
G Grids displayed: 0 = None, 1 = Major, 2 = Minor, 3 = Both
A Axis display: 0 = None, 1 = First, 2 = Second, 3 = Both
L axis tick Label display: 0 = None, 1 = First, 2 = Second, 3 = Both
R Rescale margin: in % of axis scale
M number of Minor ticks
axis -pg X G Grids; 
Grids=; //Get the value of Grids displayed.

-ps; Set parameters for the specified axis to value

Syntax: axis -ps axis type value

Set parameters for the specified axis (X or Y) to value. Valid types are as described for the previous (-pg) option. This option also includes:

T set tick labels from dataset where value specifies a dataset.
axis -ps Y L 3;

-r; Open the Reference Lines tab of the specified Axis dialog box

Syntax: axis -r axis

Open the Reference Lines tab of the Axis dialog box for axis. Where axis = X1 (Bottom X), X2 (Top X), Y1 (Left Y), Y2 (Right Y), Z1 (Front Z), and Z2 (Back Z).

-s; Scroll the specified axis by the specified increment inc

Syntax: axis -s axis inc

Scroll the indicated axis (X or Y) by the specified increment inc.inc is given in major tick units, so:axis -s x 3;scrolls the X axis by three major ticks.

-tt; Set color of axis title to follow the plot's

Syntax: axis -tt

The color of selected axis title will follow the plot specified in its %() substitution.

Examples:

The following script reduces the number of X axis Minor Ticks by half and sets the X axis to show both major and minor grids.

axis -pg X M num;
axis -ps X M int(num/2);
axis -ps X G 3;

This script sets the X axis to a log scale.

axis -ps X S 1;

Given a plot of col(B) vs. col(A) with text in col(C), the following changes the X Axis Tick Labels to use the values from column C:

range aa = [Book1]Sheet1!col(C);
axis -ps X T aa;

This code scrolls the Y axis up by two major ticks, pauses for 1 second, then scrolls back.

axis -s Y 2;
sec -p 1;
axis -s Y -2;