Chapter 2
Grammar of Graphics and Visual Components
Section 4
Facets
In data visualization, we sometimes have the need to compare different groups, looking at data alongside each other. One method for doing this is creating a subplot for each group. These kinds of plots are known as Trellis displays. In ggplot2, they're called facets. Facets divide the data by some discrete or categorical variable and display the same type of graph for each data subset. In this section, we will learn more about Facets in detail.