Getting Started |
Graphics Objects
Graphics objects are the basic elements used to display graphics and user interface elements. This table lists the graphics objects.
Object Hierarchy
The objects are organized in a tree structured hierarchy reflecting their interdependence. For example, line objects require axes objects as a frame of reference. In turn, axes objects exist only within figure objects. This diagram illustrates the tree structure.
Creating Objects
Each object has an associated function that creates the object. These functions have the same name as the objects they create. For example, the text
function creates text objects, the figure
function creates figure objects, and so on. MATLAB high-level graphics functions (like plot
and surf
) call the appropriate low-level function to draw their respective graphics. For more information about an object and a description of its properties, see the reference page for the object's creation function. Object creation functions have the same name as the object. For example, the object creation function for axes objects is called axes
.
Commands for Working with Objects
This table lists commands commonly used when working with objects.
Function |
Purpose |
copyobj |
Copy graphics object |
delete |
Delete an object |
findobj |
Find the handle 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 value of an objects properties |
set |
Set the value of an objects properties |
Handle Graphics | Setting Object Properties |