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.

Set axis limits and aspect ratios

`axis `

uses a
predefined style to set the limits and scaling. For example, specify
the style as `style`

`equal`

to use equal data unit lengths
along each axis.

`axis `

sets whether
the axes automatically chooses the limits or not. Specify the mode
as `mode`

`manual`

, `auto`

, or one of the
semiautomatic options, for example, `'auto x'`

.

`axis `

controls
the placement of the coordinate system origin and the direction of
increasing `ydirection`

*y* values. Set `ydirection`

to `ij`

to
place the origin at the upper left corner of the axes. The *y* values
increase from top to bottom. Set `ydirection`

to `xy`

to
place the origin at the lower left corner. The *y* values
increase from bottom to top. This is the default value.

`axis `

controls
the visibility of the axes or polar axes background. Set `visibility`

`visibility`

to `off`

to
turn off the display of the axes background. Plots in the axes still
display. Set `visibility`

to `on`

to
display the axes background. This is the default value.

returns
the `lim`

= axis*x*-axis and *y*-axis limits
for the current axes. For 3-D axes, it also returns the *z*-axis
limits. For polar axes, it returns the theta-axis and *r*-axis
limits.

`___ = axis(`

uses
the axes or polar axes specified by `ax`

,___)`ax`

instead
of the current axes. Specify `ax`

as the first input
argument. You can include additional input or output arguments only
if the original syntax supported them. Use single quotes around input
arguments that are character vectors, for example, `axis(ax,'equal')`

.

Was this topic helpful?