3-D Visualization |
The axis
command works by setting various axes object properties. You can set these properties directly to achieve precisely the effect you want.
Property |
Description |
|
Sets the relative scaling of the individual axis data values. Set DataAspectRatio to [1 1 1] to display real-world objects in correct proportions. Specifying a value for DataAspectRatio overrides stretch-to-fill behavior. |
|
In auto , MATLAB selects axis scales that provide the highest resolution in the space available. |
|
Sets the proportions of the axes plot box (set box to on to see the box). Specifying a value for PlotBoxAspectRatio overrides stretch-to-fill behavior. |
|
In auto , MATLAB sets the PlotBoxAspectRatio to [1 1 1] unless you explicitly set the DataAspectRatio and/or the axis limits. |
Position |
Defines the location and size of the axes with a four-element vector: [left offset, bottom offset, width, height]. |
|
Sets the minimum and maximum limits of the respective axes. |
|
In auto , MATLAB selects the axis limits. |
By default, MATLAB automatically determines values for all of these properties (i.e., all the modes are auto) and then applies stretch-to-fill. You can override any property's automatic operation by specifying a value for the property or setting its mode to manual. The value you select for a particular property depends primarily on what type of data you want to display.
Much of the data visualized with MATLAB is either
In the first case, it is generally desirable to select axis limits that provide good resolution in each axis direction and to fill the available space. Real-world objects, on the other hand, need to be represented accurately in proportion, regardless of the angle of view.
Additional Commands for Setting Aspect Ratio | Default Aspect Ratio Selection |
© 1994-2005 The MathWorks, Inc.