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 data unit length along each axis

`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 `

lets
the axes choose the data 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`

`daspect `

uses
the ratio stored in the `manual`

`DataAspectRatio`

property
for the axes object and sets the associated mode to manual. 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.

`daspect(`

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 `daspect(ax,'auto')`

and `daspect(ax,'manual')`

.

Was this topic helpful?