Handle graphics: refers to a system of graphical objects that execute functions for graphics and Visualization in MATLAB. each system is composed of a series of attributes. you can use these attributes to control the behavior and display results. i. Handle
When MATLAB constructs a graphic object, it will specify a identifier (handle) for the object. You can use this handle to obtain the graphic attributes through the set and get functions. For example, the following statement returns a line handle for a graph with h:
X =;
Y = x. ^ 3;
H = plot (x, y );
You can use the handle to set the attributes of this object. For example, you can set the color attributes of this object:
Set (H, 'color', 'red ')
Of course, you can also set its attributes when calling the plotting function, such:
H = plot (X, Y, 'color', 'red ');
When you query the linear attributes, such:
Get (H, 'linewidth ')
MATLAB returns one:
Ans =
0.5000
You can use the handle to view all the attributes of the object:
Get (h)
Shown as follows:
Color: [1 0 0]
Erasemode: 'normal'
Linestyle :'-'
Linewidth: 0.5000
Marker: 'none'
Markersize: 6
Markeredgecolor: 'auto'
Markerfacecolor: 'none'
Xdata: [1x10 double]
Ydata: [1x10 double]
Zdata: [1x0 double]
Beingdeleted: 'off'
Buttondownfcn: []
Children: [0x1 double]
Clipping: 'on'
Createfcn: []
Deletefcn: []
Busyaction: 'queue'
Handlevisibility: 'on'
Hittest: 'on'
Interruptible: 'on'
Selected: 'off'
Selectionhighlight: 'on'
Tag :''
Type: 'line'
Uicontextmenu: []
Userdata: []
Visible: 'on'
Parent: 151.0012
Displayname :''
Xdatamode: 'manual'
Xdatasource :''
Ydatasource :''
Zdatasource :''
Ii. graphic objects
A graphical object is the most basic unit used to display graphics and user interface components. These objects are organized by hierarchies as follows: