11_graphicsAdv - Plots and Images: Advanced Topics ENCMP...

Info iconThis preview shows pages 1–13. Sign up to view the full content.

View Full Document Right Arrow Icon
Plots and Images: Advanced Topics
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ENCMP 100 2 ©2011 by ECE, UofA Overview Assign a handle to plots and adjust properties using handle graphics Learn how MATLAB handles three different types of image files Plots & Images
Background image of page 2
ENCMP 100 3 ©2011 by ECE, UofA Plotting Objects In MATLAB the plotting information is organized in a hierarchical way: figure – basic plotting object, can contain a number of different objects axes – are contained inside the figure; think of the axes as being layered on top of the figure window; the axes also can contain a number of different objects plot objects – drawn on top of the axes Plots & Images
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ENCMP 100 4 ©2011 by ECE, UofA Plotting Objects figure axes layered on the top of the figure plot drawn on the axes Plots & Images
Background image of page 4
ENCMP 100 5 ©2011 by ECE, UofA Plotting Object Properties Object properties are special values associated with and objet that control some aspect of how that object behaves. Each property has a property name (usually a string) and an associated value When object is created all of it properties are automatically initialized to default values Plots & Images
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ENCMP 100 6 ©2011 by ECE, UofA Plotting Procedure When plot function is invoked MATLAB automatically creates a figure an appropriate axis draws the graph (plot) on the axis MATLAB uses default values for many of the plot object properties. For example the first line drawn is always blue, unless the user specifically changes it. Plots & Images
Background image of page 6
ENCMP 100 7 ©2011 by ECE, UofA Object Handles A handle is a “nickname” given to an object in MATLAB We can assign a handle to Individual plots The figure window The axis on which we draw the plots Plots & Images
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ENCMP 100 8 ©2011 by ECE, UofA Plot Handle Assigning a plot a name (or a handle) allows us to easily ask MATLAB to list the plot object properties. >>x = 1:100; >>y = x.^2; >>p_handle = plot(x,y) The variable p_handle is the handle of the plot. Plots & Images
Background image of page 8
ENCMP 100 9 ©2011 by ECE, UofA Plot Handle: example Plots & Images
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ENCMP 100 10 ©2011 by ECE, UofA Function get The get function can be used to examine at any time the values of properties: value = get(p_handle, ‘Property name’); >> value = get(p_handle,’LineWidth’) value = 0.5000 >> value = get(p_handle,'color’) value = 0 0 1 Plots & Images
Background image of page 10
ENCMP 100 11 ©2011 by ECE, UofA Plot Handle: get example >> get(p_handle) DisplayName: '' Annotation: [1x1 hg.Annotation] Color: [0 0 1] LineStyle: '-' LineWidth: 0.5000 Marker: 'none' MarkerSize: 6 MarkerEdgeColor: 'auto' MarkerFaceColor: 'none' XData: [1x100 double] YData: [1x100 double] ZData: [1x0 double] Plots & Images
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ENCMP 100 12 ©2011 by ECE, UofA Figure Handle We can also specify a handle name for the figure window. For the window named figure 1:
Background image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/27/2011 for the course ENCMP 100 taught by Professor Cockburn during the Spring '11 term at University of Alberta.

Page1 / 46

11_graphicsAdv - Plots and Images: Advanced Topics ENCMP...

This preview shows document pages 1 - 13. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online