ggplot2 theme with French government design template
theme_gouv(
base_family = "Marianne",
base_size = 12,
plot_title_family = "Marianne",
plot_title_size = 28,
plot_title_face = "bold",
plot_title_margin = 10,
subtitle_family = "Marianne Light",
subtitle_size = 22,
subtitle_face = "plain",
subtitle_margin = 15,
strip_text_family = base_family,
strip_text_size = 22,
strip_text_face = "plain",
strip_text_color = "black",
strip_background_color = "#FFFFFF",
caption_family = base_family,
caption_size = 12,
caption_face = "plain",
caption_margin = 10,
axis_text_size = base_size,
axis_title_family = subtitle_family,
axis_title_size = base_size,
axis_title_face = "plain",
axis_title_just = "rt",
plot_margin = margin(30, 30, 30, 30),
grid_col = "#888888",
grid = TRUE,
panel_background_color = "#FFFFFF",
panel_border_color = "#FFFFFF",
legend_background_color = "#FFFFFF",
legend_border_color = "#FFFFFF",
axis_col = "#CCCCCC",
axis = FALSE,
ticks = FALSE
)Base font family and size.
Plot title family, face, size and margin.
Plot subtitle family, face and size.
Plot subtitle margin bottom (single numeric value).
Facet label font family, face, size and color.
Facel label background color.
Plot caption family, face, size and margin.
Font size of axis text.
Axis title font family, face and size.
Axis title font justification, one of [blmcrt].
Plot margin (specify with ggplot2::margin()).
Grid and axis colors; defaults: #888888 for grid color and #CCCCCC for axis color.
Panel grid (TRUE, FALSE or a combination of X, x, Y, y).
Panel background fill color; default to white.
Panel border color; default to white.
Legend background fill color; default to white.
Legend border color; default to white.
Add x or y axes? TRUE, FALSE or "xy".
Ticks: if TRUE, add ticks.
A ggplot2 theme.
All font sizes are set in points and colors are either a color name or a hex code.
if (FALSE) { # \dontrun{
library(ggplot2)
ggplot(data = iris, aes(x = Sepal.Length, y = Sepal.Width)) +
geom_point(aes(color = Species, shape = Species)) +
labs(x = "Sepal Length", y = "Sepal Width", title = "Sepal Length-Width",
subtitle = "with theme_gouv()") + theme_gouv() +
scale_color_gouv_discrete()
} # }