cla
Clears the current axes of its graphics objects.
Category: Graphics > Formatting and Annotation
Syntax
cla
Deletes the lines, surfaces and other children of the current axes.
cla reset
Also restores the axes properties to their defaults.
cla(ax)
Clears the axes ax.
Description
The axes themselves remain, so new plots appear in the same place. Handles to the deleted objects become invalid. To clear the whole figure including its axes, use clf.
Input arguments
ax- Optional axes handle.
Example
Deleting a line
h = plot(1:5);
cla
disp(isvalid(h))
Output
0