Overrides individual theme settings. By default the overrides apply to
theme_ggnext(); pass base to restyle a different preset.
Theme(
name = character(0),
background = character(0),
panel_fill = character(0),
grid_color = character(0),
grid_color_minor = character(0),
axis_color = character(0),
label_color = character(0),
title_color = character(0),
subtitle_color = character(0),
strip_fill = character(0),
strip_color = character(0),
legend_text_color = character(0),
panel_border = character(0),
font = character(0),
title_font = character(0),
tick_font_size = integer(0),
title_font_size = integer(0),
plot_title_size = integer(0),
plot_subtitle_size = integer(0),
caption_size = integer(0),
strip_font_size = integer(0),
legend_font_size = integer(0),
title_face = character(0),
tick_len = integer(0),
grid_major_x = logical(0),
grid_major_y = logical(0),
axis_line_x = logical(0),
axis_line_y = logical(0),
ticks_x = logical(0),
ticks_y = logical(0),
axis_text_x = logical(0),
axis_text_y = logical(0),
axis_title_x = logical(0),
axis_title_y = logical(0),
legend_position = character(0),
point_palette = character(0),
gradient_low = character(0),
gradient_high = character(0)
)
theme(..., base = NULL)Preset name (informational).
Plot background color.
Panel (data area) background color.
Major gridline color; "" hides major gridlines.
Minor gridline color; "" (default) draws none.
Axis line and tick color.
Tick label and axis title color.
Plot title color.
Subtitle and caption color.
Facet strip background and text colors.
Legend label color.
Panel border color; "" (default) draws none.
CSS font-family stack used for all text.
Font stack for the plot title; "" inherits font.
Tick label size (px).
Axis title size (px).
Title block sizes (px).
Facet strip label size (px).
Legend label size (px).
Plot title weight: "bold" or "normal".
Tick mark length (px).
Draw major gridlines per axis.
Draw the axis lines.
Draw tick marks.
Draw tick labels.
Draw axis titles.
"right", "bottom", or "none".
Optional character vector overriding the discrete color palette for this plot.
Optional continuous-gradient endpoints.
Named Theme properties to override, e.g.
theme(panel_fill = "white", grid_color = "grey85").
A Theme to start from; defaults to theme_ggnext().
A Theme to add to a plot with +.
ggnext(cars, aes(speed, dist)) + geom_point() +
theme(panel_fill = "#FFF8F0", grid_major_x = FALSE)
#> <ggnext plot>
#> data: 50 x 2
#> aes: x = speed, y = dist
#> layers: 1
#> coord: cartesian
#> mode: static
# Restyle a preset rather than the default.
ggnext(cars, aes(speed, dist)) + geom_point() +
theme(base = theme_dark(), plot_title_size = 22)
#> <ggnext plot>
#> data: 50 x 2
#> aes: x = speed, y = dist
#> layers: 1
#> coord: cartesian
#> mode: static