axis

Sets ot gets the axis limits of a 2D or 3D graph

# Calling Sequence

    vect = axis(value)

## Parameters

value

- string or 1 by n vector, n=4 or n=6

vect

- 4-vector [XMIN XMAX YMIN YMAX] or 6-vector [XMIN XMAX YMIN YMAX ZMIN ZMAX]

## Description

To get the axis limits, use the syntax : AX=axis()

To set the axis limits after a plot use the syntax : axis(value)

Value can be :

- a 4-vector [XMIN XMAX YMIN YMAX] or 6-vector [XMIN XMAX YMIN YMAX ZMIN ZMAX] then the plot limits are fixed to the given limits.

- a string

  The allowed strings are Common 2D/3D values

  - 'equal' (isometric scale)

  - 'normal' (aspect ratio changes when the figure is resized)

  - 'ij' (the coordinate system origin is placed in the upper left corner)

  - 'xy' (default cartesian system)

  - 'off' (no axis is drawn)

  - 'box' (a box enclosing the plot without ticks)

  - 'tight' (the graph fits tightly the axis limits)

  - 'auto' (axis limits are computed by considering the minimum and maximum values of x,y,z data)

  - 'left' (the y axis is displayed on the left)

  - 'right' (the y axis is displayed on the right)

  - 'center' (the x and y axis cross at the center of the plot box)

  - 'origin' (the x and y axis cross at the (0,0,0) point)

## Examples

    t=linspace(0,2*%pi,63);
    plot(cos(t),sin(t));
    axis equal
    plot(cos(t),sin(t));
    axis([0 1 0 1]);

## See Also

- plot
- plot3
- mesh
- surf

## Authors

- Stéphane Mottelet