Lecture 5 advanced multipanel plots Trevor A. Branch Beautiful graphics in R, FISH554 SAFS, University of Washington.

Slides:



Advertisements
Similar presentations
What is Graphics? Graphics are visual presentations on some surface, such as a wall, canvas, computer screen, paper, or stone to brand, inform, illustrate,
Advertisements

Clint Chan Lynnwood High School
Using HTML Tables Presenting Information & Layout Control.
Lecture 6: Creating a simplicial complex from data. in a series of preparatory lectures for the Fall 2013 online course MATH:7450 (22M:305) Topics in Topology:
C ONCEPT M APS Simplify the Complex!. W HAT IS A C ONCEPT M AP ? A concept map is a diagram. It is used to represent or “break down” complex information.
Lecture 1: Beautiful graphics in R
Lecture # 11 JavaScript Graphics. Scalable Vector Graphics (SVG) Scalable Vector Graphics (SVG), as the name implies, are - scalable (without pixelation):
CGS 3175: Internet Applications (In-class Practice) Page 1 © Mark Llewellyn CGS 3175: Internet Applications Fall 2008 CSS In-class Practice School of Electrical.
Lecture 8: tables, text annotations, mathematical expressions, legends, custom axes Trevor A. Branch Beautiful graphics in R, FISH507H SAFS,
Calcul mental multiplications et divisions par multiplications par 0,1 0,01 0,001...
Visualization UW CSE 190p Summer BARE BONES VISUALIZATION IN PYTHON WITH MATPLOTLIB.
BPC: Art and Computation – Summer 2008 Selected curriculum elements Erik Brisson
Aug 22, Fall 2005ITCS4010/ ITCS4010/ Computer Game Design and Development Tiffany Barnes, Ph.D. STECH403E
Engineering H191 Engineering Fundamentals and Laboratory I
Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Sampling and Aliasing Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Software Engineering CSE470: Cheng and McUmber Software Engineering CSE470 (Fall 2001) Instructors: Dr. B. Cheng (Sect. 1-3) Dr. W. McUmber (Sect. 4-6)
Computer Science & Engineering 2111 CSE 2111 Lecture Querying a Database 1CSE 2111 Lecture- Querying a Database.
8cm 5cm Area = 8 x 5 = 40cm 2 A parallelogram can be split up into a rectangle and 2 triangles – each with the same area. 10cm 5cm.
Multiplying Polynomials
DNA microarray technology allows an individual to rapidly and quantitatively measure the expression levels of thousands of genes in a biological sample.
Week 5 & 6 Web Design – Layout & Organization. Review.
10-3 Area of Composite Figures Warm Up Warm Up Lesson Presentation Lesson Presentation Problem of the Day Problem of the Day Lesson Quizzes Lesson Quizzes.
Columns run horizontally in tables and rows run from left to right.
An Introduction to R graphics Cody Chiuzan Division of Biostatistics and Epidemiology Computing for Research I, 2012.
Using standard controls gets you a long way.
CSE 691: Energy-Efficient Computing Lecture 1: Intro and Logistics Anshul Gandhi 1307, CS building
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lect 22P. 1Winter Quarter MATLAB: Simultaneous Equations Lecture 22.
Geometry: Area By Mrs. Hafer. What is area? Area tells the size of a shape or figure. It tells us the size of squares, rectangles, circles, triangles,
CSE5334 DATA MINING CSE4334/5334 Data Mining, Fall 2014 Department of Computer Science and Engineering, University of Texas at Arlington Chengkai Li (Slides.
Definition: Rectangle A rectangle is a quadrilateral with four right angles.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 22P. 1Winter Quarter MATLAB: Simultaneous.
Digital Interests Larry Dailey Joseph DeLappe Sushil J. Louis Media Art Computer Science and Engineering.
STEM Endorsement General Courses  The STEM endorsement must include Algebra II Chemistry Physics These three courses are required to meet the STEM endorsement.
CSE 591: Energy-Efficient Computing Lecture 1: Intro and Logistics Anshul Gandhi 347, New CS building
Find the area of the parallelogram. Areas of Parallelograms and Triangles LESSON 8-1 The area of the parallelogram is 26.4 square inches. = 26.4 Simplify.
亚洲的位置和范围 吉林省白城市洮北区教师进修学校 郑春艳. Q 宠宝贝神奇之旅 —— 亚洲 Q 宠快递 你在网上拍的一套物理实验器材到了。 Q 宠宝贝打电话给你: 你好,我是快递员,有你的邮件,你的收货地址上面 写的是学校地址,现在学校放假了,能把你家的具体 位置告诉我吗? 请向快递员描述自己家的详细位置!
Review > head(tripData) > table(speciesData$SpeciesCode) > grep("a", c("aa","ab","bb")) > c(2,3,8) %in% c(1,2,3,5,7,9) > bocTrip
Similar Figures. The rectangle on the left is similar in shape to the rectangle on the right. Find the width of the right rectangle. 3 cm 6 cm 12 cm Let.
Course Area of Composite Figures 10-3 Area of Composite Figures Course 1 Warm Up Warm Up Lesson Presentation Lesson Presentation Problem of the.
Fall 2016 business intelligence
Lesson 91 Warm Up Pg. 474.
Which Isometric looks nice?
Area of Composite Figures
What is a Function Expression?
Trevor A. Branch Beautiful graphics in R, FISH554
Area of a Triangle.
Sampling and Aliasing Ed Angel
Lecture 4: overplotting and multipanel plots
Space and size organization of receptive fields in the archer fish optic tectum. Space and size organization of receptive fields in the archer fish optic.
Hierarchy of Data in a Database
Hansheng Xue School of Computer Science and Technology
Lecture 5 advanced multipanel plots
How to find the area of a parallelogram.
MediaScripting: Media Computation at Grinnell
Student Feedback on Robotics in CS1 The Fleet!
Warm Up Problem of the Day Lesson Presentation Lesson Quizzes.
1-5 Geometric Formulas Polygons
Warm Up Problem of the Day Lesson Presentation Lesson Quizzes.
Dr. Tahseen Fadhil Abbas
FBE05 – Mathematics and Statistics
SPLITTING OF COMBINED SHAPES
The coordinate system Susan Ibach | Technical Evangelist
Area of Composite Figures
What is area? The amount of space that a figure encloses
Millennium High School Agenda Calendar
Area of combined figures
Academic Senate Productivity
Enrollment Management ― Data and Emerging Trends & Policies
Computer Graphics, KKU. Lecture 11
Welcome Introduction to InformationVisualization:
Presentation transcript:

Lecture 5 advanced multipanel plots Trevor A. Branch Beautiful graphics in R, FISH554 SAFS, University of Washington

Other visualization courses at UW INFO 424 Information Visualization and Aesthetics (Ostergren, Fall ) INFX 598E Information Visualization for Information Professionals (Ostergren, summer ) HCDE 411 Information Visualization (Aragon, uses Tableau, ) HCDE 508 Visual Media (Ostergren, ) HCDE 511 Information Visualization (Aragon, ) CSE 512 Information Visualization (Heer, uses D3, HTML, R, etc. ) DESIGN 478 Information Design (Cheng, limited to Design students, ) Note: HCDE=Human Centered Design & Engineering, INFO=Information School, CSE=Computer Science & Engineering, DESIGN=School of Art, division of Design

Five multipanel methods in base R Methods cannot be combined with each other par(mfrow) or par(mfcol) layout(mat, widths, widths) par(fig) par(plt) split.screen(figs)

par(mfrow) Every figure is the same size

layout(mat) Figures must be placed on a grid system; widths and heights can be adjusted; figures can occupy more than one grid rectangle; squares can be left blank

Branch et al. (2011) Conservation Biology 25: mat <- matrix(c(1,2), nrow=1, ncol=2) layout(mat=mat, widths=c(56, 29))

maxC <- apply(reven.data, MARGIN=2,max) mat <- matrix(1:8,nrow=4,ncol=2, byrow=T) par(mar=c(0,2.5,0,0), oma=c(5,2.5,4,1)) layout(mat=mat, widths=c(30,16),heights=30+maxC)

Worm et al. (2009) Science 325: mat=matrix(c(1,2,3,4,5, 6,7,8,9,10, 0,0,0,0,0, 11,11,11,11,11), nrow=5, ncol=4, byrow=F) layout(mat=mat, heights=c(1,1,1,1,1), widths=c(5,5,3,10)) par(oma=c(5,5,1,1),mar=c(0,0,0,0))

Branch et al. (2010) Nature 468: Main plot mat <- matrix(c(1,2,3,3), nrow=2, ncol=2, byrow=F) par(oma=c(1,2,1,11), mar=c(3,2,0,1)) layout(mat=mat, widths=c(2,1.3), heights=c(2.2,1)) Trickery for bottom-right “legend” par(xpd=NA) positions <- seq(from=2025,to=2060,length. out=5) ypos <- c(-0.34,0.66) #then commands for rect(), #arrows, axis(at=,pos=), #etc. par(xpd=T)

Source: Melissa Clarkson,

par(plt=c(0.4, 0.8, 0.2, 0.7)) par(plt) Individual figures are added anywhere and of any size, one at a time. Each plot border is defined as a vector of four values (0 to 1) with positions (left, right, bottom, top)

Source: Melissa Clarkson, par(fig=c(0.4, 0.8, 0.2, 0.7)) par(fig) Individual figures are added anywhere and of any size, one at a time. Each figure border is defined as a vector of four values (0 to 1) with positions (left, right, bottom, top)

Using par(fig) and par(plt) Coordinates are given in normalized device space (from 0 to 1) and are specified by: c(left, right, bottom, top) a different order from par or oma 2. Plots can partially overlay other plots 3. Replacing fig= with plt= sets the plot border instead of the figure border Source: Melissa Clarkson,

par(fig=c(0.4,0.7,0.1,0.7)) plot(…) par(new=T) par(fig=c(0.1,0.3,0.05,0.65)) plot(…) par(new=T) par(fig=c(0.2,0.8,0.75,0.9)) plot(…) Figures at arbitrary (non-grid) locations using fig

mat <- matrix(c(0.0, 0.1, 0.9, 1.0, 0.0, 0.3, 0.7, 1.0, 0.1, 0.6, 0.4, 1.0, 0.3, 1.0, 0.0, 0.7), nrow=4,ncol=4,byrow=T) par(mar=c(0,0,0,0), oma=c(1,1,1,1)) split.screen(figs=mat) for (i in 1:4) { screen(n=i, new=F) plot(…) } close.screen(all.screens=T) Figures at arbitrary locations using split.screen Each row in matrix is the outline of a plot from 0 to 1 specified by: c(left, right, bottom, top) a different order from par or oma

mat <- matrix(c(0.0, 0.1, 0.9, 1.0, 0.0, 0.3, 0.7, 1.0, 0.1, 0.6, 0.4, 1.0, 0.3, 1.0, 0.0, 0.7), nrow=4,ncol=4,byrow=T) par(mar=c(0,0,0,0), oma=c(1,1,1,1)) split.screen(figs=mat) for (i in 1:4) { screen(n=i, new=F) plot(…) } close.screen(all.screens=T) Figures at arbitrary locations using split.screen

Branch et al. (2010) Nature 468:

Dean’s Visualization Prize The class project comprises four figures: three on your own data, one on Porzio et al. (2011) The best portfolio of figures will be awarded the Dean’s Visualization Prize by Lisa Graumlich, dean of the College of the Environment Judges: Lisa Graumlich, Trevor Branch, Marilyn Ostergren, Liz Neeley The prize is attendance at full-day seminar by Edward Tufte (includes copies of his books, more details here or a selection of visualization and R books

Porzio et al. (2011) Journal of Experimental Marine Biology and Ecology 400: Fig. 2. Kite diagram showing the distribution of the most abundant macroalgal species (N3% coverage) in 27 20×20 cm quadrats taken along a pH gradient from S1 (pH=8.1), S2 (pH=7.8) and S3 (pH=6.7). R=Rhodophyta, O=Ochrophyta, and C=Chlorophyta. Class project: Figure 1

Separate PowerPoint showing past class projects (not posted)

First attempt in R