FUNCTION REFERENCE

axis

Set axis limits of the current plot.

Set axis limits of the current plot.

Syntax

axis([xmin xmax ymin ymax])

Syntax

axis tight

Syntax

axis auto

Syntax

axis equal

Syntax

axis image

Syntax

axis ij

Syntax

axis off

Syntax

axis manual

Syntax

axis(ax, ...)

Syntax

axis(limits, option, ...)

Sets both axis ranges, or returns them to automatic limits. axis equal makes one data unit as long in x as in y (widening the shorter range); axis image does the same with tight limits; axis square makes the plot box square; axis normal and axis fill turn these off. axis manual freezes the limits shown now. axis ij puts y = 0 at the top (images use it), axis xy restores it. axis off hides the frame, ticks and axis labels; axis on shows them. axis vis3d is accepted. Several arguments combine and apply left to right: axis equal tight, axis([0 1 0 1], 'square').

Example

axis([0 10 -1 1])   % x from 0 to 10, y from -1 to 1

Example

plot([0 1], [0 2]); axis equal

Example

plot(1:3); axis manual; hold on; plot(1:10); xlim   % [1 3]

Differences from MATLAB: axis equal widens the limits instead of shrinking the plot box; axis fill behaves like axis normal and axis vis3d changes nothing, since views are not rotated interactively.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.