Plotting Concepts

Transcription

Plotting Concepts
First rule of data analysis:
Plot your data
meanx = 9
meany = 7.5
variancex = 11
variancey = 4.12
correlationxy = 0.816
regression: y=0.5x + 3
Anscombe’s Quartet
same x mean and y mean,
x variance and y variance,
correlation and regression!
http://en.wikipedia.org/wiki/Anscombe%27s_quartet
Edward Tufte
Maximize Data : Ink
Chartjunk and vibrating graphics
Too many labels
Pseudo 3D
Banish the boxes
Unnecessary keys and legends
Problems with pies
Pies + Chartjunk = A Mess
Improving a Chart
Linus Pauling, 1947
The Tufte Treatment
Good Practices
Direct labeling
Nest plots to save space
Use small multiples
Nest to convey patterns
Promote comparison
Have a visual hierarchy
Fix me!
Periodic data - the common approach
Periodic data - a novel approach
Use Color Judiciously
Don’t use color gratuitously
Use color for emphasis
Sequences:
W-a
M1
1.60
M2
M3 M4 M5
M6
EE 4.1
C1
C2 C3 C4
EE 4.2
C5 C6
EE 4.3
1.20
0.80
0.40
0.00
Mohawkian
Exodus
1.60
1.20
Richmondian
Invasion
study
interval
0.80
0.40
0.00
Age (Ma)
460
Stage
Upper
Series
WHITE.
455
Black Riveran
450
R K
MOHAWKIAN
Sherm.
Edenian
445
Mays.
Richmondian
CINCINNATIAN
Contrast data
tSD=10.9, p<<0.001
S
D
Make connections between slides
tSD=8.7, p<<0.001
S
D
Consistency in color: make connections between slides
Consistency in color: make connections between slides
Consistency in color: make connections between slides
Fix me!
What sports should be eliminated to save money?
Canoeing
Archery
Synchronized swimming
Skiing
Fencing
Water polo
Crew
Bowling
Ice hockey
Gymnastics
Field hockey
Lacrosse
Golf
Swimming & diving
Football
Wrestling
Tennis
Soccer
Softball
Cross country
Volleyball
Track and field
Baseball
Basketball
n=300
0
20
40
60
Percent of Respondents
80
100
Common Plots
Bar Graph
Corn harvesting area (x1000 acres)
3000
2500
2000
1500
1000
500
0
Ohio
Michigan
Georgia
Alabama
Wyoming
barplot(corn, xlab='', ylab='Corn harvesting area (x1000 acres)', names.arg=names, las=1)
Florida
Histogram
25
Frequency
20
15
10
5
0
40
60
80
100
120
x
hist(x, col="gray", main="", las=1)
140
160
180
Rose Diagram
N
W
E
10
20
30
40
rose(x, theFill=”gray”) # Function written by SMH
Scatterplot
3
concentration
2
1
0
−1
2
3
4
5
time
plot(x, y, xlab="abundance", ylab="diversity", las=1, pch=16)
plot(x, y, xlab="time", ylab="concentration", las=1, type="l", lwd=2)
6
Contour Plots (Surface Plots)
10
10
120
8
100
meters north
meters north
8
6
4
80
6
60
4
40
20
2
2
0
2
4
6
meters east
8
10
2
4
6
meters east
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)
8
10
Bubble Plot
Cd concentration
●●
●
●● ●
●
●
●
●
●
●
●●
●
●
●
●
●
●
●
● ●
●
●
●
●
● ●
●
● ●
●
●
●
●
●
●●● ●
●
●
●
●
●
●
●
●
●
●
●
●
●
2
4
8
16
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●●
●
●
●
●
●
●
●
●
●●●●●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●● ●
●
●
●
●●●●
●
●
●
●
●●
●
● ● ●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●●
●
●
●
●
●
●
●
●
●
●
bubble(meuse, "cadmium", maxsize=2.5, main="Cd concentration", key.entries=2^(1:4)) #requires gstat and ps packages
Bubble Plot
1
SUPERHALOCLINE
σT:
0.5
26
HALOCLINE
26.5
SUBHALOCLINE
27
27.5
28
Cooling of
Atlantic water
CT (µmol C kg-1)
Temperature (°C)
2225
0
2200
2175
-0.5
-1
2150
Northwind Ridge /
Chukchi Plateau
Northwest
Canada Basin
Salinization
through freezing
26.5
-1.5
South Central
Canada Basin
-2
32
32.5
freezing line
33
33.5
Salinity (pss)
34
34.5
35
Pie Chart
Spartina
Iva
Salicornia
Borrichia
Juncus
pie(x, labels=plants)
Pie charts vs. bar graphs
https://en.wikipedia.org/wiki/Pie_chart
Ternary Charts
Quartz
●
●
●
●
●●
●
●
●●●
●
●
●
●
●
●
●
●
●
●
●
●
●●
●
●
●
●
Feldspar
ternaryplot(myData, cex=0.5, col="black", labels=c("none"), main="") #requires vcd package
Lithics

Similar documents

Weathering in modern carbonate terrains

Weathering in modern carbonate terrains • Sulfide-rich and low pH water discharge may degrade corals & seagrasses • Elevated natural nutrient discharge may enhance corals and seagrasses • Sea level change will shift distribution of disch...

More information