- making good graphics for publication
- basic principles of graphing
- building blocks of graphs
- examples of common types of graph
Peter Geelan-Small – Stats Central, UNSW
13/06/2019
“… statistical graphics are instruments to help people reason about quantitative information”
Maximise the “data-ink ratio”
Make the data stand out
Make the data stand out continued
Colour - symbols and lines
Avoid “chartjunk”
Make sure the graph is properly understood
Two areas for showing variation:
Data: A sample of three types of gastropod shell was scored as occupied by a hermit crab or empty
Question: Do hermit crabs prefer a certain shell type?
Species | Occupied | Empty |
---|---|---|
Austrocochlea | 47 | 42 |
Bembicium | 10 | 41 |
Cerithiidae | 125 | 49 |
Mosaic plot
Data: Measurements of brain and body weight, life span, gestation time, time sleeping, predation and danger indices for 62 species of mammals
Question: What is the best prediction model for total sleep time?
Log-transform positively skewed data to clarify relationships
Jitter points to avoid overplotting - open circles remain distinct
Add local trend line (loess)
Solid circles for display on screen?
What does this graph tell you?
Data: Measurements on 102 male and 100 female athletes collected at the Australian Institute of Sport
Question: What variables are important in explaining ferritin concentration?
Sport | Hematocrit |
Gender - female, male | Hemoglobin |
Height (cm) | Plasma ferritin concentration |
Weight (kg) | Body mass index |
Lean body mass | Sum of skin folds |
Red cell count | Percent body fat |
White cell count |
Empirical variation in data
Axis labels could be more informative?
(A dot plot may even be clearer)
Pie charts
3-D pie charts
Clustered histograms
Clustered density plots
Clustered box plots
Violin plots
A useful picture of variation in means?
Don’t start scale at zero if data values are not close to zero.
What do the error bars show?
Describe what the error bars show!
Much clearer!
Variation of fitted values
Back to the sleeping mammals data
Think about what the purpose of the graph is
Put the components of the graph together to make its message clear
Look at the outcome - show it to a colleague
Do it all again … and again …
Creating effective graphs is an iterative process
Happy graphing!
Cleveland, William S. 1994. The Elements of Graphing Data. AT&T Laboratories: Murray Hill, USA. 2nd edition.
Chen, Chun-houh et al. (eds) 2008. Handbook of Data Visualization. Springer: Berlin, Germany.
Edward Tufte’s principles for visualising data - one of many websites
Colour palettes and specifications: ColorBrewer (Also R package: RColorBrewer)
Also for R users: Hadley Wickham’s ggplot2 package
Another R package: pals