Getting Started Previous page   Next Page

Graphics Objects

Graphics objects are the basic elements used to display graphs and user interface components. These objects are organized into a hierarchy, as shown by the following diagram.

Key Graphics Objects

When you call a function to create a graph, MATLAB creates a hierarchy of graphics objects. For example, calling the plot function creates the following graphics objects:

Different types of graphs use different objects to represent data: however, all data objects are contained in axes and all objects (except root) are contained in figures.

The root is an abstract object that primarily stores information about your computer or MATLAB state. You cannot create an instance of the root object.

User interface objects are used to create graphical user interfaces (GUIs). These objects include components like push buttons, editable text boxes, and list boxes.

Creating Objects

Plotting functions (like plot and surf) call the appropriate low-level function to draw their respective graph. For information about an object's properties, see the Handle Graphics Property Browser in the MATLAB online documentation.

Commands for Working with Objects

This table lists commands commonly used when working with objects.

Function
Purpose
allchild
Find all children of specified objects
ancestor
Find ancestor of graphics object
copyobj
Copy graphics object
delete
Delete an object
findall
Find all graphics objects (including hidden handles)
findobj
Find the handles of objects having specified property values
gca
Return the handle of the current axes
gcf
Return the handle of the current figure
gco
Return the handle of the current object
get
Query the values of an object's properties
ishandle
True if value is valid object handle
set
Set the values of an object's properties


Previous page  Handle Graphics Setting Object Properties Next page

© 1994-2005 The MathWorks, Inc.