Graphics |
While object creation routines that create axes children do not explicitly change axes properties, some axes properties are under automatic control when their associated mode property is set to auto
(which is the default). The following table lists the automatic-mode properties.
Mode Properties |
What It Controls |
|
Positioning of the viewpoint |
|
Positioning of the camera target in the axes |
|
The direction of "up" in 2-D and 3-D views |
|
The size of the projected scene and stretch-to-fit behavior |
|
Mapping of data values to colors |
|
Relative scaling of data units along x, y, and z axes and stretch-to-fit behavior |
|
Relative scaling of plot box along x, y, and z axes and stretch-to-fit behavior |
|
Direction of axis tick marks (in for 2-D, out for 3-D) |
|
Limits of the respective x, y, and z axes |
|
Tick mark spacing along the respective x, y, and z axes |
|
Tick mark labels along the respective x, y, and z axes |
For example, if all property values are set to their defaults and you enter these statements
the second line
statement causes the YLim
property to change from [0 10]
to [0 100]
.
This is because YLimMode
is auto
, which always causes MATLAB to recompute the axis limits.
If you set the value controlled by an automatic-mode property, MATLAB sets the mode to manual
and does not automatically recompute the value.
For example, in the statements
the set
statement sets the x- and y-axis limits and changes the XLimMode
and YLimMode
properties to manual
. The second line
statement now draws a line that is clipped to the axis limits [1 12]
instead of causing the axes to recompute its limits.
Using Multiple X and Y Axes | Colors Controlled by Axes |