Main Content

Graphics Object Identification

Finding, copying, and deleting graphics objects

Functions

gcaCurrent axes or chart
gcfCurrent figure handle
gcbfHandle of figure containing object whose callback is executing
gcboHandle of object whose callback is executing
gcoHandle of current object
grootGraphics root object
ancestorAncestor of graphics object
allchildFind all children of specified objects
findallFind all graphics objects
findobjFind graphics objects with specific properties
findfigsFind visible offscreen figures
gobjectsInitialize array for graphics objects
isgraphicsTrue for valid graphics object handles
ishandleTest for valid graphics or Java object handle
copyobjCopy graphics objects and their descendants
deleteDelete files or objects

Topics

Find Objects

The findobj function can scan the object hierarchy to obtain the handles of objects that have specific property values.

Copy Objects

Copy objects from one parent to another using the copyobj function.

Delete Graphics Objects

Remove graphics objects with the delete function.

Special Object Identifiers

MATLAB® provides functions that return important object handles so that you can obtain these handles whenever you require them.