6601 Project---Graphics --Enhancing Plots --Fine Control of Graphics Xingyan Bai, Qian Zhang, Ying Li.

Slides:



Advertisements
Similar presentations
Matlab Graphics S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: 2D Graphics.
Advertisements

1. Overview 2. plot in 2D 3. Plot in 3D 4. Other possible charts 5. Engineers: label your plots! 6. Plots & Polynomial Plotting 11.
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.
Plotting Systems in R Dr. Jieh-Shan George YEH
Coordinate Systems John Kirby.
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.
MATLAB GRAPHICS 2-D.
Evan Girvetz Winkenwerder Introduction to Graphics in R © R Foundation, from
MATLAB - Lecture 22A Two Dimensional Plots / Chapter 5 Topics Covered:
EGR106 Week 6 MATLAB FILES Two Dimensional Plots Multiple Plots
FISH 397C Winter 2009 Evan Girvetz More Complex Graphics in R © R Foundation, from
EGR106 Week 4 Two Dimensional Plots Multiple Plots Plot Formatting Homework.
Lecture 9 Plotting in 2-D Plotting in 2-D, Plotting Multiple Curves, Plotting with Figures, Plot Settings, Scaling, Legends © 2007 Daniel Valentine. All.
Python plotting for lab folk Only the stuff you need to know to make publishable figures of your data. For all else: ask Sourish.
Baburao Kamble (Ph.D) University of Nebraska-Lincoln Data Analysis Using R Week5: Charts/Plots in R.
Some Possibly Useful Graphics Functions Lunch presentation.
An Introduction to R graphics Elizabeth Garrett-Mayer Slides borrowed from Cody Chiuzan & Delia Voronca March 24, 2014.
Fundamental Graphics in R Prof. Ke-Sheng Cheng Dept. of Bioenvironmental Systems Eng. National Taiwan University.
AN INTRODUCTION TO GRAPHICS IN R. Today Overview Overview –Gallery of R Graph examples High-Level Plotting Functions High-Level Plotting Functions Low-Level.
Graphics in R. X
ENG College of Engineering Engineering Education Innovation Center 1 2D Plots 1 in MATLAB Topics Covered: 1.Plotting basic 2-D plots The plot()
R-Graphics Day 2 Stephen Opiyo. Basic Graphs One of the main reasons data analysts turn to R is for its strong graphic capabilities. R generates publication-ready.
Creating Graphs in R Graphing techniques Sharon style! (I am not sure if this is a good or bad thing but this is what I do...)
„  1999 BG Mobasseri1 9/18/2015 June 2 GRAPHICS IN MATLAB- PART I BASIC PLOTTING.
Ranjeet Department of Physics & Astrophysics University of Delhi Working with Origin.
Copyright © 2001 by Wiley. All rights reserved. Chapter 11: Using Visual Basic to Create Graphics Scale Method Line Method Line Charts Bar Charts Pie Charts.
Statistical Software R. More data sets …. See
A Picture Is Worth A Thousand Words. DAY 7: EXCEL CHAPTER 4 Tazin Afrin September 10,
Graphing Parameters Titles X-Axis Title Y-Axis Title Legend Scales Color Gridlines library(help="graphics") Basic Chart Types The R Graphics Package LineHistogram.
An Introduction to R graphics Cody Chiuzan Division of Biostatistics and Epidemiology Computing for Research I, 2012.
Chapter 13 The Math for Graphing in DC Circuits. Graphing Overview  Critical for practical analysis many different natural systems. Note: Theoretical.
Excel chapter 4.
Recap Sum and Product Functions Matrix Size Function Variance and Standard Deviation Random Numbers Complex Numbers.
Designing Effective Graphics Using MATLAB The Cain Project in Engineering and Professional Communication Linda Driskill, Gang Cheng,
Learn R Toolkit D Kelly O'DayBox, Dot, Histogram, Strip Charts Mod 5 –Box Charts: 1 Module 5 Box, Dot, Histogram, Strip Charts Do See & HearRead Learn.
ENG 1181 College of Engineering Engineering Education Innovation Center MATLAB – 2D Plots 1 Go to the class drive: ---> MatLab - Graphing ---> Seed Files.
DAY 6: MICROSOFT EXCEL – CHAPTER 3 Sravanthi Lakkimsetty September 2, 2015.
R-Graphics Stephen Opiyo. Basic Graphs One of the main reasons data analysts turn to R is for its strong graphic capabilities. R generates publication-ready.
Excel Chapter 3: Excel Charts Objectives Decide which chart type to create Create a chart Change the chart type Change the data source and structure Apply.
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,
R (3) Introduction to Graphics. The main guide R in Action Data Analysis and Graphics with R Robert I. Kabacoff
Plotting Complex Figures Using R
Coordinate Plane.
Introduction to Engineering MATLAB – 9 Plotting - 2 Agenda Formatting plots.
Non-Linear and Smooth Regression: An Introductory Example (V&R 8.1) Rommel Vives Lin Zhang Statistics 6601 Project, Fall 2004.
S-PLUS Lecture 6 Jaeyong Lee. Graphical Parameters type = “c”: c =p (default), l, b,s,o,h,n. pch=“+” : character or numbers 1 – 18 lty=1 : numbers lwd=2.
Excel Part 4 Working with Charts and Graphics. XP Objectives Create an embedded chart Work with chart titles and legends Create and format a pie chart.
MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.1 Simple Plot of Time.
Creating Charts Ms. Hall Spring Using the Insert Tab to Create Charts The Insert tab contains the command groups you’ll use to create charts in.
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.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Lab 2 : potting to Matlab Networks.
SGT Beans Easy-To-Use Graphics Toolkit for Java Applications Donald W. Denbo UW/JISAO-NOAA/PMEL.
Introduction to plotting data Fish 552: Lecture 4.
Correlation coefficients and simple linear regression Chapter 7.1 ~ 7.6.
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.
Review > mean(humidity, na.rm=T) > humidity[!is.na(humidity)] > X x Y Y[[1]][2,3] > zone.fac
Chapter 8 Sensors and Camera. Figure 08.01: The Accelerometer can gauge the orientation of a stationary device.
Statistical Programming Using the R Language Lecture 2 Basic Concepts II Darren J. Fitzpatrick, Ph.D April 2016.
Using R Graphs in R.
Lecture 25.
Lecture 25: Exploring data
Two-Dimensional Plots
Trevor A. Branch FISH 552 Introduction to R
Lecture 5 advanced multipanel plots
Microsoft Excel Illustrated
Microsoft Office Illustrated Introductory, Windows XP Edition
Plotting Signals in MATLAB
Introduction to R plot Instructor: Li, Han
Simulate Multiple Dice
Presentation transcript:

6601 Project---Graphics --Enhancing Plots --Fine Control of Graphics Xingyan Bai, Qian Zhang, Ying Li

Enhancing Plots Multiple figures on one plot Adding information  Using Color  Identifying points interactively  Adding further axes and grids  Adding legends  Mathematics in labels

Multiple figures on one plot  par(mfrow = c(…)) par(mfcol = c(…))  split.screen(figs, screen, …) screen(n =, …) erase.screen(n = ) close.screen(n, …)  subplot(fun, …) in S-plus

Multiple figures on one plot Example Code: split.screen(figs=c(3,2)) [1] hist(t.stars, nclass=20, prob=TRUE) screen(3) hist(t.stars, nclass=10, prob=TRUE) screen(6) hist(t.stars, nclass=30, prob=TRUE)

Multiple figures on one plot Example Code: par(mfrow=c(2,3)) hist(t.stars, nclass=20, prob=TRUE) hist(t.stars, nclass=10, prob=TRUE) hist(t.stars, nclass=30, prob=TRUE) hist(t.stars, nclass=5, prob=TRUE) hist(t.stars, nclass=15, prob=TRUE) hist(t.stars, nclass=50, prob=TRUE)

Using Color Code par(mfrow=c(2,1)) hist(t.stars, nclass=20, prob=TRUE, col='gray', border='white') hist(t.stars, nclass=10, prob=TRUE, col='green', border='red')

Code par(mfrow=c(1,1)) plot(data$x, data$y) identify(data$x,data$y) [1] Identifying points interactively

Code locator(5,type='l') $x [1] $y [1] Identifying points using locator()

Code > library(MASS) > attach(wtloss) > oldpar <- par() > par(mar = c(5.1, 4.1, 4.1, 4.1)) > plot(Days, Weight, type = "p", ylab = "Weight (kg)") > Wt.lbs <- pretty(range(Weight*2.205)) > axis(side = 4, at = Wt.lbs/2.205, lab = Wt.lbs, srt = 90) > mtext("Weight (lb)", side = 4, line = 3) > detach() > par(oldpar) Adding further axes and grids

Adding legends Code plot(ecdf(y), main='Empirical Distribution of Y') curve(pexp(x, 1/mean(y)), add=TRUE, col='red') legend(200, 0.6, c('EDF','Fitted model (Exponential)'), + lty=c(1,1), col=c('black','red'))

Fine Control of Graphics Par Command Figure region and layout parameters Common axes for figures

Par Command Par ( name = value) set value to name Par (name) return the value of name Par () return a list of all the graphics parameters

Figure region and layout parameters Regions: plot region, margins, figure region, device region Layout parameters: control size and position of figure and plot regions mar()/mai(): for margin region, fig(): for figure as a fraction of device region, plt(): for plot as a fraction of figure region. User coordinates: for positions in the plot region

Example for layout parameters Code x <- rnorm(50) y <- rnorm(x) z <- rexp(x) par(fig = c(0, 2/3, 0, 1)) plot(x, y) par(fig = c(2/3, 1, 0, 1)) plot(x, z) par("usr") [1]

Example for layout parameters

Common axes for figures  Use the same xlim or ylim  Set up the desired axis system with the first plot and then use Par to set the low-level parameter xaxs = “d” & yaxs = “d”, which (direct) specifies that the current axis should be used on subsequent plots.  Some of the more commonly used general and high- level graphics parameters see Table4.4(page 87)

Thank You !