Skip to contents

A single ggplot2 theme used by every zhn_plot_*() function so the figure look is identical everywhere and a restyle is a one-line edit. Minimal panel (light major gridlines only, no minor grid, no panel border), Inter type, and generous margins.

Usage

zhn_theme(base_size = 11, transparent = FALSE)

Arguments

base_size

Base font size in points.

transparent

If TRUE, the panel and plot backgrounds are fully transparent (fill = NA); otherwise white. Driven by the app's transparency toggle so live display and exports match.

Value

A ggplot2::theme object (add it to a plot with +).

Examples

# Returns a ggplot2 theme object; add it to any plot with `+`.
th <- zhn_theme()
th_transparent <- zhn_theme(base_size = 13, transparent = TRUE)