Graphics Previous page   Next Page

Automatic-Mode Properties

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 Property
What It Controls
CameraPositionMode
Positioning of the viewpoint
CameraTargetMode
Positioning of the camera target in the axes
CameraUpVectorMode
The direction of "up" in 2-D and 3-D views
CameraViewAngleMode
The size of the projected scene and stretch-to-fit behavior
CLimMode
Mapping of data values to colors
DataAspectRatioMode
Relative scaling of data units along x-, y-, and z-axes and stretch-to-fit behavior
PlotBoxAspectRatioMode
Relative scaling of plot box along x-, y-, and z-axes and stretch-to-fit behavior
TickDirMode
Direction of axis tick marks (in for 2-D, out for 3-D)
XLimMode
YLimMode
ZLimMode

Limits of the respective x, y, and z axes
XTickMode
YTickMode
ZTickMode

Tick mark spacing along the respective x-, y-, and z-axes
XTickLabelMode
YTickLabelMode
ZTickLabelMode

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.


Previous page  Using Multiple X- and Y-Axes Colors Controlled by Axes Next page

© 1994-2005 The MathWorks, Inc.