CS 211 Lesson 26

Handle Graphics

Quote:

"It is difficulties that show what men are."  Epictetus

Lesson Objectives:

Lesson:

I. MATLAB Concepts

A. MATLAB's Handle Graphics

B. Object Handles

C. Object Properties

x = 1:0.1:10;
Line_handle = plot(x, sin(x));
Line_properties = get(Line_handle);
disp(Line_properties)
                 Color: [0 0 1]
             EraseMode: 'normal'
             LineStyle: '-'
             LineWidth: 0.5000
                Marker: 'none'
            MarkerSize: 6
       MarkerEdgeColor: 'auto'
       MarkerFaceColor: 'none'
                 XData: [1x91 double]
                 YData: [1x91 double]
                 ZData: [1x0 double]
          BeingDeleted: 'off'
         ButtonDownFcn: []
              Children: [0x1 double]
              Clipping: 'on'
             CreateFcn: []
             DeleteFcn: []
            BusyAction: 'queue'
      HandleVisibility: 'on'
               HitTest: 'on'
         Interruptible: 'on'
              Selected: 'on'
    SelectionHighlight: 'on'
                   Tag: ''
                  Type: 'line'
         UIContextMenu: 1.0760e+003
              UserData: []
               Visible: 'on'
                Parent: 665.9969
           DisplayName: ''
             XDataMode: 'manual'
           XDataSource: ''
           YDataSource: ''
           ZDataSource: ''
set(Line_handle, 'LineWidth', 3);
Width = get(Line_handle, 'LineWidth');
disp(Width)
     3

D. Graphic Object Organization - The hierarchy of handle graphic objects

II. Good Programming Practices

 

III. Algorithms

Lab Work: Lab 26

References:  Chapman Textbook: section 9.1-9.4