3-D Visualization |
Specifying Axis Scaling
The axis
command enables you to adjust the scaling of graphs. By default, MATLAB finds the maxima and minima of the plotted data and chooses appropriate axes ranges. You can override the defaults by setting axis limits.
You can control how MATLAB scales the axes with predefined axis
options:
axis
auto
returns the axis scaling to its default, automatic mode. v = axis
saves the scaling of the axes of the current plot in vector v
. For subsequent graphics commands to have these same axis limits, follow them with axis(v)
.
axis
manual
freezes the scaling at the current limits. If you then set hold
on
, subsequent plots use the current limits. Specifying values for axis limits also sets axis scaling to manual.
axis
tight
sets the axis limits to the range of the data.
axis
ij
places MATLAB into its "matrix" axes mode. The coordinate system origin is at the upper left corner. The i-axis is vertical and is numbered from top to bottom. The j-axis is horizontal and is numbered from left to right.
axis
xy
places MATLAB into its default Cartesian axes mode. The coordinate system origin is at the lower left corner. The x-axis is horizontal and is numbered from left to right. The y-axis is vertical and is numbered from bottom to top.
Understanding Axes Aspect Ratio | Specifying Aspect Ratio |
© 1994-2005 The MathWorks, Inc.