Chapter 6. Plot Output

In this chapter, we will take a look at the different methods you can use to save or manipulate the output generated with ggplot2. We will cover the different methods of displaying multiple plots in a unique plot page and how to save the plots that you have created on your hard drive.

Multiple plots in one page

If you are already familiar with the graphics package, you know that in R, you have the opportunity to create plot windows on which you can arrange multiple plots. In ggplot2, there is no single function available to do that, but you will need to become familiar with certain basic concepts of the grid package, which was used to build ggplot2. In grid, you have the possibility of defining viewports, which are rectangular ...

Get ggplot2 Essentials 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.