Skip to main content

SetAxis

SetAxis [/W=winName /A[=a ]/E=z /N=n /R/Z] axisName [, num1, num2 ]

The SetAxis operation sets the extent (or "range") of the named axis.

Parameters

axisName is usually "left", "right", "top", or "bottom", but it can also be the name of a free axis, such as "vertCrossing".

If axisName is a vertical axis such as "left" or "right" then num1 sets the bottom end of the axis and num2 sets the top end of the axis.

If axisName is a horizontal axis such as "top" or "bottom" then num1 sets the left end of the axis and num2 sets the right end of the axis.

You can flip the graph by reversing num1 and num2 (or by using /A/R). This is particularly useful for images, because Igor plots an image inverted.

If you pass * (asterisk) for num1 and/or num2 then the corresponding end of the axis will be autoscaled.

Flags

/A[=a ]Autoscale axis (when used, num1, num2 should be omitted).
a =0:No autoscale. Same as no /A flag.
a =1:Normal autoscale. Same as /A.
a =2:Autoscale Y axis to a subset of the data defined by the current X axis range.
/E=zSets the treatment of zero when the axis is in autoscale mode.
z =0:Normal mode where zero is not treated special.
z =1:forces the smaller end of the axis to be set to zero (autoscale from zero).
z =2:Axis is symmetric about zero.
z =3:If the data is unipolar (all positive or all negative), this behaves like /E=1 (autoscale from zero). If the data is bipolar, it behaves like /E=0 (normal autoscaling).
/N=nSets the algorithm for autoscaling the axis.
n =0:Normal mode which sets the axis limits equal to the data limits.
n =1:Tries to pick nice values for the axis limits.
n =2:Picks nice values, but also ensures that the data is inset from the ends of the axis.
/RReverses the autoscaled axis (smaller values at the left for horizontal axes, at the top for vertical axes) when used with /A. Although it only has an effect for autoscale, it can be used with nonautoscale version of SetAxis so that the next time the Axis Range tab is used the "reverse axis" check box will already be set.
/W=winNameSets axes in the named graph window or subwindow. When omitted, action will affect the active window or subwindow. This must be the first flag specified when used in a Proc or Macro or on the command line.
When identifying a subwindow with winName, see Subwindow Syntax for details on forming the window hierarchy.
/ZDoesn't generate error if the named axis doesn't exist. Used for style macros.