Note: This page has been translated by MathWorks. Click here to see

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

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

Control data unit length along each axis

`daspect(ratio)`

`d = daspect`

`daspect auto`

`daspect manual`

`m = daspect('mode')`

`___ = daspect(ax,___)`

`daspect(`

sets
the data aspect ratio for the current axes. The data aspect ratio
is the relative length of the data units along the `ratio`

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

as
a three-element vector of positive values that represent the relative
lengths of data units along each axis. For example, ```
[1 2
3]
```

indicates that the length from 0 to 1 along the *x*-axis
is equal to the length from 0 to 2 along the *y*-axis
and 0 to 3 along the *z*-axis. For equal data unit
lengths in all directions, use `[1 1 1]`

.

`daspect `

sets
an automatic mode, enabling the axes to choose the data aspect ratio.
The mode must be automatic to enable the “stretch-to-fill” feature of the
axes.`auto`

`daspect `

sets
a manual mode and uses the ratio stored in the `manual`

`DataAspectRatio`

property
for the `Axes`

object. When the mode is manual, it
disables the stretch-to-fill behavior of the axes. Specifying a value
for the data aspect ratio sets the mode to manual.

The `daspect`

function sets and queries several
axes properties related to the data aspect ratio.

`DataAspectRatio`

— Property that stores the data aspect ratio value.`DataAspectRatioMode`

— Property that stores the data aspect ratio mode. When you set the ratio, this property changes to`'manual'`

.