Chapter 13. Graphics
There are many different ways to plot graphics in R. In this
book, we’ll focus on the three most popular packages: graphics
, lattice
, and ggplot2
.
The
package contains a wide variety
of functions for plotting data. It is easy to customize or modify charts
with the graphics
graphics
package, or to interact
with plots on the screen. The lattice
package contains an alternative set of functions for plotting data. Lattice
graphics are well suited for splitting data by a conditioning variable.
Finally, ggplot2
uses a different
metaphor for graphics, allowing you to easily and quickly create stunning
charts. This chapter gives an overview of the graphics
package. We’ll explain how to use lattice
graphics in Chapter 14, and ggplot2
in Chapter 15.
Get R in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.