Leland Wilkinson’s Grammar of Graphics proposed a way to break graphics in to a set of common building blocks. Hadley Wickham’s A Layered Grammar of Graphics transformed data visualization by expanding on these ideas.
The paper extends Leland Wilkinson’s Grammar of Graphics by:
This allows for high levels of control over increasingly complex graphics.
Every graphic is built from a combination of:
| Component | Example |
|---|---|
| Data | diamonds_sample |
| Aesthetics | carat to x, price to y |
| Geometry | points |
| Scale | continuous |
| Coordinates | Cartesian |
This example comes directly from the paper’s discussion of defaults and layering.
The power in this grammar comes from control. A histogram is a good example.
It combines:
Separating statistics from geometries makes it easy to create new graphical forms.
This example illustrates one of the paper’s most powerful ideas:
Changing the coordinate system can transform one graphic into another without changing the underlying data.
The Grammar of Graphics introduced:
These ideas continue to influence modern visualization systems far beyond R.
Today the Grammar of Graphics influences:
More than a decade after publication, it remains one of the most influential papers in statistical computing.
Wickham, H. (2010). A Layered Grammar of Graphics. Journal of Computational and Graphical Statistics, 19(1), 3–28.
Wilkinson, L. (2005). The Grammar of Graphics. Springer.