Академический Документы
Профессиональный Документы
Культура Документы
Statistical Graphs
Hanspeter Pfister & Joe Blitzstein
pfister@seas.harvard.edu / blitzstein@stat.harvard.edu
xkcd
This Week
HW0 - due today Tuesday (not graded)
Flowing Data
Scale Distortions
Flowing Data
Scale Distortions
Scale Distortions
Always start your bar graphs at zero!
Nielson
Scale Distortions
A. Kriebel,VizWiz
Global Warming?
Mother Jones
Global Warming!
Mother Jones
The Lie Factor
Size of effect shown in graphic
Size of effect in data
Tufte,VDQI
U.S. SmartPhone Marketshare
21.2%
RIM
Apple 39.0%
Palm 3.1%
Motorola
Nokia 7.4%
Other
9.8%
19.5%
U.S. SmartPhone Marketshare
40%
39.0
30%
20% 21.2
19.5
10%
9.8
7.4
3.1
0%
RIM Other Apple Palm Motorola Nokia
Why 3D Pie Charts are Bad
Kevin Fox
Maximize Data-Ink Ratio
Data ink
Data-Ink Ratio =
Total ink used in graphic
700
525
350
175
Males
0
Females
700
525
350
175
0
Males Females
matplotlib gallery
http://nbviewer.ipython.org/5357268
Matplotlib Notebooks
Links under Readings on the course web site
ggplot2 (R)
creator
Tuftes Design Principles
Clear, detailed, and thorough labeling and
appropriate scales
Size of the graphic effect should be directly
proportional to the numerical quantities (lie
factor)
Nicolas Rapp
Trends Over Time
Line Charts
matplotlib gallery
Bars vs. Lines
Lines imply connections - do not use for categorical data
Zacks 1999
Dont
Use bar charts to compare book ratings
eagereyes.org
Banking to 45
Two line segments are maximally discriminable when
their average absolute angle is 45
W. Cleveland
NoGrey
Light
BlackBorder
Border
Border
http://nbviewer.ipython.org/5357268
Overplotting
Overplotting
alpha = 1/100
Trend Lines
Dont
matplot3d tutorial
Compositions
Pie Charts
Pie vs. Bar Charts
Donut Chart
v.s.
VizWiz Blog
Dont
eagerpies.com
Small Multiples
http://stackoverflow.com/questions/2225995/how-can-i-create-stacked-line-graph-with-matplotlib
100% Stacked Area Chart
http://stackoverflow.com/questions/16875546/create-a-100-stacked-area-chart-with-matplotlib
Stacked Area vs. Line Graphs
leancrew.com &
Practically Efficient
Stacked Area vs. Line Graphs
leancrew.com &
Practically Efficient
Stacked Area vs. Line Graphs
VizWiz, A. Kriebel
Stacked Area vs. Line Graphs
VizWiz, A. Kriebel
Stacked Area vs. Line Graphs
VizWiz, A. Kriebel
Distributions
Histogram
Histogram
2D Density Plots
Box & Whisker Plots
Box & Whisker Plots
R. Simmon
Rainbow Colors
matplotlib gallery
Rainbow Colormap
hard to order lower resolution
Borland 2007
Rainbow Colormap
Rainbow colormap is perceptually nonlinear
R. Simmon
Rainbow Colormap
R. Simmon
Rainbow Colormap
Brewer Scales
Nominal
Ordinal
http://nbviewer.ipython.org/5357268
Divergent Brewer Scales
Not great
http://nbviewer.ipython.org/5357268
Further Reading
Edward Tufte
Stephen Few