Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
Effective plots
Steven M. HollandGeology
meanx = 9 meany = 7.5
variancex = 11 variancey = 4.12
correlationxy = 0.816 regression: y=0.5x + 3
Anscombe’s Quartet
same x mean, y mean,
x variance, y variance, correlation,
& regression!
http://en.wikipedia.org/wiki/Anscombe%27s_quartet
First rule of data analysis:
Plot your dataEdward Tufte
Washington Post
Maximize the data to ink ratio
Vibrating graphics Too many labels
Pseudo 3D Box overload
Unnecessary keys and legends Chartjunk
USA Today
Gizmodo
Business Insider
Don’t be deceptive
FOX News
Don’t be deceptive
FOX News
Don’t be deceptive
FOX News
Don’t be deceptive
Improving your charts
Linus Pauling, 1947
The Tufte Treatment The Tufte Treatment
Plots should make a point
Unnecessary keys and legends
Cincinnati Enquirer
Solution: direct labeling
What sports should be eliminated to save money?
Confusing visual hierarchy Solution: size & boldness reflect importance
Small multiples
Combine plots to promote comparison
Limits to how many data series can be combined Use small multiples
Small multiples - before Small multiples - after
Nest to convey patterns
Small multiples in maps
Using color
Don’t use color as decoration
Use color for emphasis
0.00
0.40
0.80
1.20
1.60
W-a M1 M2 M3 M4 M5 M6 C1 C2 C3 C4 C5 C6
CINCINNATIANWHITE. MOHAWKIAN
Upper Black Riveran R K Sherm. Edenian Mays. Richmondian
460 455 450 445Age (Ma)
Stage
Series
EE 4.1 EE 4.2 EE 4.3
0.00
0.40
0.80
1.20
1.60
Sequences:
study interval
MohawkianExodus
RichmondianInvasion
Use color to reflect a variable
Use color to contrast groups of data Use color to make connections
Consistency in color: make connections between slides Consistency in color: make connections between slides
Consistency in color: make connections between slides
Design plots with a message
Maximize the data to ink ratio
Use small multiples
Use color to make a point
Common plots
Bar Graph
barplot(corn, xlab='', ylab='Corn harvesting area (x1000 acres)', names.arg=names, las=1)
Ohio Michigan Georgia Alabama Wyoming Florida
Cor
n ha
rves
ting
area
(x10
00 a
cres
)
0
500
1000
1500
2000
2500
3000
x
Frequency
40 60 80 100 120 140 160 180
0
5
10
15
20
25
Histogram
hist(x, col="gray", main="", las=1)
10
20
30
40
N
EW
Rose Diagram
rose(x, theFill=”gray”) # Function written by SMH
Scatterplot
plot(x, y, xlab="abundance", ylab="diversity", las=1, pch=16)plot(x, y, xlab="time", ylab="concentration", las=1, type="l", lwd=2)
2 3 4 5 6
−1
0
1
2
3
time
concentration
Contour Plots (Surface Plots)
contour(myX, myY, myData, xlab="meters east", ylab="meters north", las=1)filled.contour(myX, myY, myData, xlab="meters east", ylab="meters north", las=1, color.palette=rainbow)
meters east
met
ers
north
2 4 6 8 10
2
4
6
8
10
0
20
40
60
80
100
120
2 4 6 8 10
2
4
6
8
10
meters east
met
ers
north
Bubble Plot
bubble(meuse, "cadmium", maxsize=2.5, main="Cd concentration", key.entries=2^(1:4)) #requires gstat and ps packages
Cd concentration
●● ●●
●●
●●
●●
●
●
●●●
●●
●●●●●
●
●
●●●
●●
●
●
●●
●
●●
●●●●●
●●
●
●
●
●
●
●
●●
●●●●●●
●●
●●●●
●●
●●
●
●
●●●
● ●
●●
●
●
●●●
●
●
●
●
●
●
●
●
●●●
●
●
●
●
●●
●
●
●
●
●
●
●
●
●
●
●
●●
●
●
●●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●●
●
●●
●
●●
●●●
●
●
●
●●●
●
●
●
●●
24816
Bubble Plot
https://acasignups.net/21/08/11/us-covid19-vaccination-levels-county-over-time
Spartina
Juncus
Borrichia
Salicornia
Iva
Pie Chart
pie(x, labels=plants) https://en.wikipedia.org/wiki/Pie_chart
Pie charts vs. bar graphs
https://en.wikipedia.org/wiki/Pie_chart
Pie charts vs. bar graphs Ternary Charts
ternaryplot(myData, cex=0.5, col="black", labels=c("none"), main="") #requires vcd package
Feldspar Lithics
Quartz
●
●
● ●
●
●●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●