Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

라이선스가 부여된 사용자만 번역 문서를 볼 수 있습니다. 번역 문서를 보려면 로그인하십시오.

clf

Clear current figure window

Syntax

clf
clf('reset')
clf(fig)
clf(fig,'reset')
figure_handle = clf(...)

Description

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

clf('reset') deletes from the current figure all graphics objects regardless of the setting of their HandleVisibility property and resets all figure properties except Position, Units, PaperPosition, and PaperUnits to their default values.

clf(fig) or clf(fig,'reset') clears the single figure with handle fig.

figure_handle = clf(...) returns the handle of the figure. This is useful when the figure IntegerHandle property is off because the noninteger handle becomes invalid when the reset option is used (i.e., IntegerHandle is reset to on, which is the default).

Alternatives

Use Clear Figure from the figure window's Edit menu to clear the contents of a figure. You can also create a desktop shortcut to clear the current figure with one mouse click. See Create Shortcuts to Rerun Commands.

More About

collapse all

Tips

The clf 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, clf deletes only those objects whose HandleVisibility property is set to on.

See Also

| | |

Introduced before R2006a

Was this topic helpful?