
Theme for fourfold displays
theme_fourfold.Rd`theme_fourfold()` supplies a square, uncluttered panel and responsive typography for [geom_fourfold()]. It also styles facet strips like fourfold stratum headings and provides compact spacing that remains readable in both the RStudio plot pane and exported graphics.
Details
`base_size` and `base_family` control all text, including the category and count labels drawn inside `geom_fourfold()`. Those labels respond to the physical panel size while retaining a readable lower bound. Additional theme elements passed through `...` are applied last and therefore override the defaults.
This theme uses ggplot2's theme-derived geom defaults and requires ggplot2 4.0.0 or later.
Examples
ucb <- as.data.frame(UCBAdmissions)
ggplot2::ggplot(
ucb,
ggplot2::aes(x = Gender, y = Admit, weight = Freq)
) +
geom_fourfold() +
ggplot2::facet_wrap(ggplot2::vars(Dept), ncol = 3) +
theme_fourfold(base_size = 12)