4.18 Facetting (1)
- Small multiples: Display a plot across values/categories of another variable
- Aim of facetting: Increase density while keeping readability
- Types of facetting: Grid and wrapped (Show Figure 14.1)
- Q: According to which variable does Figure 4.8 split the data? (note the
~
infacet_wrap(~variable)
)
- Q: According to which variable does Figure 4.8 split the data? (note the
ggplot(data %>% filter(followers_count<50000), # Filter!
aes(x = account_age_years,
y = followers_count, color = party)) +
geom_point() +
facet_wrap(~female)

Figure 4.8: Facetting according to the party variable