Figures & Axes, Printing & Saving. Outline Announcements –Homework I on web, due Wed. 5PM by e-mail –No lecture on Fri. 10/26, rescheduled to Wed. 10/31.

Slides:



Advertisements
Similar presentations
Interaction Design: Visio
Advertisements

Working with Profiles in IX1D v 3 – A Tutorial © 2006 Interpex Limited All rights reserved Version 1.0.
Chapter 3 – Web Design Tables & Page Layout
Plotting Selim Aksoy Bilkent University Department of Computer Engineering
Lecture (4) Plotting & Programming (1) Eng. Osama Talaat 1.
Introduction to M ATLAB 2 Graphics Ian Brooks Institute for Climate & Atmospheric Science School of Earth & Environment
Foundation Level Course
PowerPoint. Getting Started with PowerPoint Objectives Start PowerPoint and open presentations Explore toolbars and menus Use the Office Assistant Work.
MATLAB’s extensive, device-independent plotting capabilities are one of its most powerful features. They make it very easy to plot any data at any time.
Introduction to PowerPoint
Customizing Graphs Base graphics options. plot() The workhorse plotting function plot(x) plots values of x in sequence or a barplot plot(x, y) produces.
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. Office Excel 2003 Lab 2 Charting Worksheet Data.
Graphics in MATLAB Week 15 – 5/5/09 Kate Musgrave
EGR106 Week 6 MATLAB FILES Two Dimensional Plots Multiple Plots
MATLAB Week 3 17 November Outline Graphics – Basic plotting – Editing plots from GUI – Editing plots from m-file – Advanced plotting commands.
Statistics and Simple Plots. Outline Announcements: –Homework II: due Wed. by 5, by Cookie Challenge Statistics Simple plots Tutorial 4.
1 Computing for Todays Lecture 10 Yumei Huo Fall 2006.
Lecture 9 Plotting in 2-D Plotting in 2-D, Plotting Multiple Curves, Plotting with Figures, Plot Settings, Scaling, Legends © 2007 Daniel Valentine. All.
Using Charts in a Presentation Lesson 6. Software Orientation Charts can help your audience understand relationships among numerical values. The figure.
XP New Perspectives on Microsoft Office Excel 2003 Tutorial 4 1 Microsoft Office Excel 2003 Tutorial 4 – Working With Charts and Graphics.
Chapter 5 Using Business Information Sets
Pasewark & Pasewark 1 Access Lesson 4 Creating and Modifying Forms Microsoft Office 2007: Introductory.
Abstract # 0000 Make the Main Title with Large Bold Type Your Name Here Your Department Here Texas A&M Health Science Center Make the Main Title with Large.
An introduction to Plotting in MATLAB Rikard Johansson Department of Biomedical Engineering (IMT) Linköping University
 Insert a picture from a file  Move and delete images  Use the Picture Tools tab  Add styles, effects, and captions to images  Resize photos  Use.
Chapter 5 Review: Plotting Introduction to MATLAB 7 Engineering 161.
Make the Main Title with Large Bold Type Your Name and Title Here Your Department Here Texas A&M Health Science Center Make the Main Title with Large Bold.
Basic PowerPoint Skills. What is a Presentation? Presentation: an informative speech that usually includes visuals, such as slides. The file name for.
PLOTS AND FIGURES DAVID COOPER SUMMER Plots One of the primary uses for MATLAB is to be able to create publication quality figures from you data.
ENG College of Engineering Engineering Education Innovation Center 1 2D Plots 1 in MATLAB Topics Covered: 1.Plotting basic 2-D plots The plot()
Return to the Excel 2007 web page Lesson 6: Discovering the Magic of Excel Charting.
1 "A picture is worth a thousand words." Graphical representation is useful for: Error detection - you can locate outliers in a dataset, program bugs,
Matlab tutorial course Lesson 5: Loading and writing data, producing visual output
Ranjeet Department of Physics & Astrophysics University of Delhi Working with Origin.
XP 1 Microsoft Word 2002 Tutorial 1 – Creating a Document.
MA/CS 3751 Fall 2002 Lecture 24. MA/CS 3752 ginput ginput is a Matlab function which takes one argument input: number of points to select in the image.
MATLAB and SimulinkLecture 51 To days Outline Linear Equations ODE Integration Handle Graphics. Exercises on this days topics.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room , Chris Hill, Room ,
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 3 Welcome Application Introduction to Visual Programming.
Lesson 19: Charting and Transmitting Worksheet Data.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 3.1 Test-Driving the Welcome Application 3.2.
Statistics and Simple Plots. Outline Announcements: –Homework II: due Today. by 5, by Statistics Simple plots.
SUNY-New Paltz Computer Simulation Lab Electrical and Computer Engineering Department SUNY – New Paltz “Lecture 9”
1 ADVANCED MICROSOFT POWERPOINT Lesson 9 – Importing and Exporting Information Microsoft Office 2003: Advanced.
Outline Announcements –Homework I due Wed. 5PM by Subject: CIS 402 Homework 1 Plain text Not allowed to use errorbar Try to do plotCI without looking.
CREATING CHARTS By: Dr. Ennis - Cole OBJECTIVES b Identify the elements of an Excel chart b Identify the type of chart represents your data most effectively.
Return to Outline Copyright © 2011 by Maribeth H. Price 3-1 Labeling and annotation.
Barak Shenhav Early Evolution Course 11 Feb 2001 MATLAB Visualization, Functions & Debugging.
Figures & Axes, Printing & Saving. Outline Announcements –Homework I due Wed. 5PM by –No lecture on Fri. 10/26, rescheduled to Wed. 10/31 at 8AM.
GUI development with Matlab: GUI Front Panel Components GUI development with Matlab: Other GUI Components 1 Other GUI components In this section, we will.
Written by: Itzik Ben Shabat Technion - Israel Institute of Technology Faculty of Mechanical Engineering Laboratory for CAD & Lifecycle Engineering Lab.
Recap Chapter 5 “Plotting” Two Dimensional Plots Simple x-y Plots Titles, Labels and Grids Multiple Plots.
EGR 106 Lecture 6 2-D Plotting Graphical presentation has become the standard method to show technical information. Engineers use plots to analyze, visualize,
ElVis Improvements Summer 2008 Eric Zatz PPPL Summer Intern Mentor – Eliot Feibush August 11, 2008.
Introduction to Drafting and Design In order to begin our drawing we have to set the drawing limits or the paper size.
Handle Graphics and 1D Primitives Some Handel graphics.
Microsoft FrontPage 2003 Illustrated Complete Creating a Frames Page.
MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.1 Simple Plot of Time.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Lab 2 : potting to Matlab Networks.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Illustrator lecture 1: how to use Adobe Illustrator with raster maps? Yhd Water and people.
Graphics Intro UC Berkeley Fall 2007, E7 Copyright , Andy Packard and Roberto Horowitz. This work is licensed under the Creative Commons Attribution-ShareAlike.
Figures & Axes, Printing & Saving. Outline Announcements –Homework I on web, due Wed. 5PM by e- mail A word on HWI and cookies What happens when you plot.
EGR 106 – Week 5 – 2-D Plots Question : Why do engineers use plots? Answer : To analyze, visualize, and present data. Matlab has many useful plotting options.
Microsoft Access 2007 – Level 2
3D-Graphs A 3D surface is defined as: z = f(x, y)
Ch3 Graphics Overview of Plotting Editing Plots
Lecture 25: Exploring data
MatLab – Palm Chapter 5 2-D & 3-D Plots
Plotting Signals in MATLAB
Presentation transcript:

Figures & Axes, Printing & Saving

Outline Announcements –Homework I on web, due Wed. 5PM by –No lecture on Fri. 10/26, rescheduled to Wed. 10/31 at 8AM (free caffeine & carbohydrates) What happens when you plot Figures Axes Printing and saving

What happens when you plot We know that plot(x,y) produces a line object We also know that we can get a handle to the object and change its properties But, other things happen too: –A new window is created (a “figure”) –A white rectangle is placed in the window (an “axes”) –The rectangle has ticks and numbers attached to it –The line object is placed on the rectangle

Figures and Axes Figures and axes are also objects We can get handles to them and change their properties These objects are created as needed when graphics routines are called –They can also be created explicitly

Figures If no figures are open, Matlab will create one when you call a graphics routine If a figure is open, then any subsequent graphics will be placed in that figure Figures can be created explicitly by calling figure –h=figure; --creates a new figure, handle saved in h Figures can be cleared with clf

Multiple Figures If multiple figures are open and you call plot, where does the new line go? –One of the figures is the “current figure” the current figure is the last one you plotted into or the last one created the function gcf returns a handle to the current figure

More ways to use figure –figure(n) if figure number n doesn’t exist, then it is created if it exists, then it becomes the current figure regardless, it will be the current figure –figure(h)--changes current figure to h (a figure handle) Delete figures with close –close(h)--closes figure with handle h –close(n)--closes figure number n –close all closes all figures Multiple Figures

Figure Properties Lots of properties, the interesting ones are –color--color of figure (usually gray) –colormap--specifies colors for 2D plots –Paper stuff--controls how figure maps onto printer page

–Position--[llx,lly,width, height] (llx,lly) is the position of the lower-left corner –Renderer-- ‘painters’, ‘zbuffer’, ‘OpenGL’ algorithms used to display the graphics –Units-- ‘pixels’ or ‘relative’ --units used to specify position Figure Properties

Axes Figures can only contain axes (and some special GUI stuff) Axes can contain anything (except figures, axes, and some GUI stuff) Axes are created if needed Can be created explictly with axes –axes -- creates default axes (most of fig) –axes(‘position’,[llx,lly,width, height])--creates axes with specific position –can return handle to the new axes

Multiple Axes If several axes exist on gcf, where does your plot go? –One of the axes is the “current axes” The current axes is the last one you plotted into or the last one created The function gca returns a handle to the current axes Switching gcf will switch gca

Multiple Axes In many ways, axes and figures are managed the same way, but… –axes are not numbered in any intelligible way, so axes(1) is meaningless –If you have multiple axes, you must save their handles and switch axes using axes(h) –Matlab’s subplot command returns some of this functionality (example in a minute)

Axes Properties Box--on/off --switches box around axes on and off Camera stuff--controls how the objects in axes are viewed Clim--limits for color mapping Color--color of the axes (usually white) Font stuff--controls fonts on labels Line stuff--properties of the axes lines (options for grid lines)

NextPlot-- ‘add’, ‘replace’, ‘replacechildren’-- what happens to objects in axes when a new one is created –default is replace--old stuff is deleted –can change to add using “hold on” or replace using “hold off” Position--controls where the axes goes in figure Tick stuff--controls properties of tick marks Title--handle of text object with axes title –title(‘axes title’) will title the axes Units--several options, default is normalized Axes Properties

Axes have 3 axes: X (horizontal), Y (vertical), Z (height) We can control the range and appearance of each –XColor--color of the axis lines –XGrid--on/off turns grid lines on or off –XLabel--handle of text object with x axis label xlabel(‘x label’) will label the x axis –XLim--range of the x axis cas set xlim and ylim togther with axis command –XScale--linear/log --can plot on a log10 scale

–Xtick--where the tick marks (and labels) occur –XTickLabel--the labels Matlab works hard to pick “good” labels (base 10) Can change labels by setting ticklabel –set(gca, ‘xticklabel’, ‘first|second|third’) –Setting Xtick or XTickLabel will change XTickMode or XLabelModes to ‘manual’-- may give problems if figure is resized Axes Properties

Handle Tree Matlab organizes graphics like a tree The parent and children fields allow you to traverse the tree FIGURE GUIAXES TEXTLINE get(gca,’parent’) gca get(gca,’children’)

Example--subplot vs. multiax You can produce mulitple axes laid out in a regular fashion using subplot –subplot(m,n,j) produces the jth axes from an m-by-n grid of axes –if subplot(m,n,j) exists, then calling it will set gca to this axes –h=subplot(m,n,j) returns the handle to the jth subplot subplot(3,2,4)

Criticisms of subplot Numbering is consistent with English, but not with Matlab Too much white space--gets ugly if m or n are big ax=multiax(m,n,{limits}) is a “flexible, hands- on” alternative to subplot –ax(1)=handle to invisible axes encompassing whole figure useful for annotating figure –ax(1+(1:m*n))=handles to the m*n subplots numbered “correctly” –limits allows you to control space around axes

Printing and Saving Print through GUI or command line –print -depsc fname.eps will save gcf to an EPS file –print -djpeg fname.jpg will save gcf to a JPEG –Can also save figure to a.fig file from the GUI Opening the file (from GUI) will recreate the figure