Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Control relative lengths of each axis

`pbaspect(`

sets
the plot box aspect ratio for the current axes. The plot box aspect
ratio is the relative length of the `ratio`

)*x*-axis, *y*-axis,
and *z*-axis. Specify `ratio`

as
a three-element vector of positive values that represent the ratio
of the *x*-axis, *y*-axis, and *z*-axis
lengths. For example, `[3 1 1]`

specifies that the
length of the *x*-axis is equal to three times
the length of the *y*-axis and *z*-axis.
For equal axis lengths in all directions, use `[1 1 1]`

.

`pbaspect `

lets
the axes choose the appropriate plot box aspect ratio and sets the
associated mode to automatic. The mode must be automatic to enable
the stretch-to-fill feature
of the axes.`auto`

`pbaspect `

uses
the ratio stored in the `manual`

`PlotBoxAspectRatio`

property
of the axes object and sets the associated mode to manual. When the
mode is manual, it disables the stretch-to-fill feature of the axes.
Specifying a value for the plot box aspect ratio sets the mode to
manual.

`pbaspect(`

uses
the axes specified by `ax`

,___)`ax`

instead of the current
axes. Specify an axes object with any of the input argument combinations
in the previous syntaxes. Use single quotes around input arguments
that are character vectors, for example `pbaspect(ax,'auto')`

and `pbaspect(ax,'manual')`

.

Was this topic helpful?