### 16.4 Manipulating Existing Plots

— Function File: axis (limits)

> Set axis limits for plots.

> The argument limits should be a 2, 4, or 6 element vector. The first and second elements specify the lower and upper limits for the x axis. The third and fourth specify the limits for the y axis, and the fifth and sixth specify the limits for the z axis.

> Without any arguments, `axis` turns autoscaling on.

> With one output argument, `x=axis` returns the current axes (this is not yet implemented for automatic axes).

> The vector argument specifying limits is optional, and additional string arguments may be used to specify various axis properties. For example,

>               axis ([1, 2, 3, 4], "square");

> forces a square aspect ratio, and

>               axis ("labely", "tic");

> turns tic marks on for all axes and tic mark labels on for the y-axis only.

> The following options control the aspect ratio of the axes.

> `"square"`
>   Force a square aspect ratio.
> `"equal"`
>   Force x distance to equal y-distance.
> `"normal"`
>   Restore the balance.

> The following options control the way axis limits are interpreted.

> `"auto"`
>   Set the specified axes to have nice limits around the data or all if no axes are specified.
> `"manual"`
>   Fix the current axes limits.
> `"tight"`
>   Fix axes to the limits of the data (not implemented).

> The option `"image"` is equivalent to `"tight"` and `"equal"`.

> The following options affect the appearance of tic marks.

> `"on"`
>   Turn tic marks and labels on for all axes.
> `"off"`
>   Turn tic marks off for all axes.
> `"tic[xyz]"`
>   Turn tic marks on for all axes, or turn them on for the specified axes and off for the remainder.
> `"label[xyz]"`
>   Turn tic labels on for all axes, or turn them on for the specified axes and off for the remainder.
> `"nolabel"`
>   Turn tic labels off for all axes.
> Note, if there are no tic marks for an axis, there can be no labels.

> The following options affect the direction of increasing values on the axes.

> `"ij"`
>   Reverse y-axis, so lower values are nearer the top.
> `"xy"`
>   Restore y-axis, so higher values are nearer the top.

— Function File: gca ()

> Return the current axis handle.

— Function File: gcf ()

> Return the current figure handle.

— Built-in Function: get (h, p)

> Return the named property p from the graphics handle h. If p is omitted, return the complete property list for h. If h is a vector, return a cell array including the property values or lists respectively.

— Built-in Function: set (h, p, v, ...)

> Set the named property value or vector p to the value v in the graphics handle h.

— Function File: clf ()

> Clear the current figure.

— Function File: delete (file)
— Function File: delete (h)

> Delete the named file or figure handle.

— Command: close
— Command: close (n)
— Command: close all
— Command: close all hidden

> Close the plot window(s).

— Function File: closereq ()

> Close the current figure.

— Function File: isfigure (h)

> Return 1 if h is a graphics handle that contains a figure object and 0 otherwise.