O'Reilly logo

R Graphics, 2nd Edition by Paul Murrell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5

The Grammar of Graphics: The ggplot2 Package

Chapter preview

This chapter describes how to produce plots using the ggplot2 package. There is a brief introduction to the concepts underlying the Grammar of Graphics paradigm as well as a description of the functions used to produce plots within this paradigm. The distinguishing feature of the ggplot2 package is its ability to produce a very wide range of different plots from a relatively small set of fundamental components. Because ggplot2 uses grid to draw plots, this chapter describes another way to produce a complete plot using the grid system.

The ggplot2 package provides an interpretation and extension of the ideas in Leland Wilkinson’s book The Grammar of Graphics. The ggplot2 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required