Faceting & Composing Plots
You now know how to build a single, well-labelled plot with the right geometry for your data. In this final tutorial, you’ll learn how to scale that up: splitting one plot into many small panels, combining several unrelated plots into one figure, and saving your work to a file.
You will cover:
- Faceting: splitting a plot into subplots by one or two categorical variables.
- Saving plots: writing a
ggplot2figure to disk as PDF, PNG, or JPEG. - Composing plots: arranging several independent plots into a single figure.