Skip to Main Content Skip to Search
Product Documentation

cla - Clear current axes

Alternatives

Remove axes and clear objects from them in plot edit mode. For details, see Working in Plot Edit Mode in the MATLAB Graphics documentation.

Syntax

cla
cla reset
cla(ax)
cla(ax,'reset')

Description

cla deletes from the current axes all graphics objects whose handles are not hidden (i.e., their HandleVisibility property is set to on).

cla reset deletes from the current axes all graphics objects regardless of the setting of their HandleVisibility property and resets all axes properties, except Position and Units, to their default values.

cla(ax) or cla(ax,'reset') clears the single axes with handle ax.

Tips

The cla command behaves the same way when issued on the command line as it does in callback routines — it does not recognize the HandleVisibility setting of callback. This means that when issued from within a callback routine, cla deletes only those objects whose HandleVisibility property is set to on.

See Also

clf | hold | newplot | reset

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS