Themes

Six presets, and 35 individual settings you can override with theme(). Every setting travels inside the geometry buffer, so the static and interactive targets always agree.

theme_ggnext
theme_ggnext() — The default: a softly tinted panel with white gridlines.
theme_minimal
theme_minimal() — No panel fill, light grey grid, no axis lines or ticks.
theme_classic
theme_classic() — White panel, black axes, no grid, serif type - the statistical-journal look.
theme_modern
theme_modern() — Editorial styling: large title, horizontal rules only, a brighter palette.
theme_dark
theme_dark() — Dark background with a palette tuned for it.
theme_void
theme_void() — No chrome at all - for treemaps, networks, and sparkline-style output.

Customizing

Override any setting on top of any preset. base picks the preset to start from; everything else is applied over it.

ggnext(cars, aes(speed, dist)) + geom_point() +
  theme(
    base = theme_minimal(),
    panel_fill = "#FFF8F0",
    grid_major_x = FALSE,
    plot_title_size = 22,
    legend_position = "bottom",
    point_palette = c("#2B6BE0", "#E05A2B", "#12A594")
  )

Colour settings accept any R colour specification - a name like "steelblue" or a hex string. An empty string "" means do not draw this element, which is how grid_color = "" removes gridlines entirely.

Every setting

SettingDefault
Colors
background#FFFFFF
panel_fill#F4F4F6
grid_color#FFFFFF
grid_color_minor
axis_color#3A3A3A
label_color#3A3A3A
title_color#1A1A22
subtitle_color#5A5A66
strip_fill#E4E4EA
strip_color#2A2A33
legend_text_color#3A3A3A
panel_border
Typography
fontHelvetica, Arial, sans-serif
title_font
tick_font_size11
title_font_size13
plot_title_size17
plot_subtitle_size12
caption_size10
strip_font_size11
legend_font_size11
title_facebold
Structure
tick_len5
grid_major_xTRUE
grid_major_yTRUE
axis_line_xTRUE
axis_line_yTRUE
ticks_xTRUE
ticks_yTRUE
axis_text_xTRUE
axis_text_yTRUE
axis_title_xTRUE
axis_title_yTRUE
legend_positionright
point_palette
gradient_low
gradient_high