16.1 What is faceting?
Faceting breaks down a dataset into multiple plots that show different subsets of the data, often plotting the same variables in each plot.
There are three types of faceting functions:
facet_null()
: a single plot, the defaultfacet_wrap()
: “wraps” a 1d ribbon of panels into 2dfacet_grid()
: produces a 2d grid of panels defined by variables which form the rows and columns