reset

Restores the properties of a graphics object to their defaults.

Category: Graphics > Graphics Objects

Syntax

reset(h)

Resets the properties of the object h (and its children) to default values, except a few such as position and units.

Description

Use reset to undo property changes such as custom limits, fonts or colors without deleting the object. Position and size are kept, so the object stays where it was.

To remove the plotted content as well, use cla reset for axes or clf reset for figures.

Input arguments

h
Handle of a figure, axes or other graphics object.

Example

Reset the current axes

plot(1:3)
ax = gca;
ax.XLim = [0 10];
reset(ax)

Notes

In MatLivre reset is accepted, but customized properties such as axes limits are not restored.

See also

cla clf set get gca