Main Content

Graphics Object Identification

Finding, copying, and deleting graphics objects

Functions

gca Current axes or chart
gcf Current figure handle
gcbf Handle of figure containing object whose callback is executing
gcbo Handle of object whose callback is executing
gco Handle of current object
groot Graphics root object
ancestor Ancestor of graphics object
allchild Find all children of specified objects
findall Find all graphics objects
findobj Find graphics objects with specific properties
findfigs Find visible offscreen figures
gobjects Initialize array for graphics objects
isgraphics True for valid graphics object handles
ishandle Test for valid graphics orJavaobject handle
copyobj Copy graphics objects and their descendants
delete Delete files or objects

Topics

Find Objects

Thefindobjfunction 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 thecopyobjfunction.

Delete Graphics Objects

Remove graphics objects with thedeletefunction.

Special Object Identifiers

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