Graphics    

Graphics Object Creation Functions

Each graphics object (except the root object) has a corresponding creation function, named for the object it creates. This table lists the creation functions.

Function
Object Description
axes
Rectangular coordinate system that scales and orients axes children image, light, line, patch, surface, and text objects.
figure
Window for displaying graphics.
image
2-D picture defined by either colormap indices or RGB values. The data can be 8-bit or double precision data.
light
Directional light source located within the axes and affecting patches and surfaces.
line
Line formed by connecting the coordinate data with straight line segments, in the sequence specified.
patch
Polygonal shell created by interpreting each column in the coordinate matrices as a separate polygon.
rectangle
2-D filled area having a shape that can range from a rectangle to an ellipse.
surface
Surface created with rectangular faces defined by interpreting matrix elements as heights above a plane.
text
Character string located in the axes coordinate system.
uicontextmenu
Context menu that you can associate with other graphics object.
uicontrol
Programmable user-interface device, such as pushbutton, slider, or listbox.
uimenu
Programmable menu appearing at the top of a figure window.

All object creation functions have a similar format.

You can specify a value for any object property (except those that are read only) by passing property name/property value pairs as arguments. The function returns the handle of the object it creates, which you can use to query and modify properties after creating the object.


  Properties Common to All Objects Example -- Creating Graphics Objects