Chapter 15. ggplot2

Hadley Wickham’s ggplot2[46] has become one of the most popular R packages. ggplot2 is a great tool for producing readable charts. But more importantly, ggplot2 uses a language for describing how to plot data called the grammar of graphics. In this chapter, I’ll explain how to use the grammar of graphics to produce plots with ggplot2.



[46] There is also a ggplot package; it was superseded by ggplot2. We won’t cover ggplot in this book.