Getting Started |
Controlling the Axes
The axis
command provides a number of options for setting the scaling, orientation, and aspect ratio of graphs. You can also set these options interactively. See Editing Plots for more information.
Setting Axis Limits
By default, MATLAB finds the maxima and minima of the data and chooses the axis limits to span this range. The axis
command enables you to specify your own limits:
or for three-dimensional graphs,
to reenable MATLAB automatic limit selection.
Setting Axis Aspect Ratio
axis
also enables you to specify a number of predefined modes. For example,
makes the x-axis and y-axis the same length:
makes the individual tick mark increments on the x-axes and y-axes the same length. This means
followed by either axis square
or axis equal
turns the oval into a proper circle:
returns the axis scaling to its default automatic mode.
Setting Axis Visibility
You can use the axis
command to make the axis visible or invisible.
makes the axes visible. This is the default.
Setting Grid Lines
The grid
command toggles grid lines on and off. The statement
For More Information
See the axis and axes reference pages and Axes Properties in the MATLAB documentation. |
Multiple Plots in One Figure | Axis Labels and Titles |
© 1994-2005 The MathWorks, Inc.