axis

Sets the scaling and range of x, y and z axis's (x by default). Called with out arguments, axis will turn autoscaling on.

Syntax

axis()

axis([X_lo X_hi])

axis([X_lo X_hi Y_lo Y_hi])

axis([X_lo X_hi Y_lo Y_hi Z_lo Z_hi])

Inputs

X_lo, X_hi
Lowest and highest x ranges.
Type: double | integer
Dimension: scalar
Y_lo, Y_hi
Lowest and highest y ranges.
Type: double | integer
Dimension: scalar
Z_lo, Z_hi
Lowest and highest z ranges.
Type: double | integer
Dimension: scalar

Example

Simple axis example:

clf;
x=linspace(-pi,pi, 100);
plot(x,sin(x));
axis ([-4 4 -1.5 1.5])
Figure 1. Simple axis example