Getting Started |
Handle Graphics
Handle Graphics refers to a system of graphics objects that MATLAB uses to implement graphing and visualization functions. Each object created has a fixed set of properties. You can use these properties to control the behavior and appearance of your graph.
When you call a plotting function, MATLAB creates the graph using various graphics objects, such as a figure window, axes, lines, text, and so on. MATLAB enables you to query the value of each property and set the values of most properties.
For example, the following statement creates a figure with a white background color and without displaying the figure toolbar:
Using the Handle
Whenever MATLAB creates a graphics object, it assigns an identifier (called a handle) to the object. You can use this handle to access the object's properties with the set
and get
functions. For example, the following statements create a graph and return a handle to a lineseries object in h
:
You can use the handle h
to set the properties of the lineseries object. For example, you can set its Color
property:
You can also specify properties when you call the plotting function:
When you query the lineseries properties,
Use the handle to see what properties a particular object contains:
Printing Graphics | Graphics Objects |
© 1994-2005 The MathWorks, Inc.