theme_gouv | R Documentation |
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_family, base_size |
Base font family and size. |
plot_title_family, plot_title_face, plot_title_size, plot_title_margin |
Plot title family, face, size and margin. |
subtitle_family, subtitle_face, subtitle_size |
Plot subtitle family, face and size. |
subtitle_margin |
Plot subtitle margin bottom (single numeric value). |
strip_text_family, strip_text_face, strip_text_size, strip_text_color |
Facet label font family, face, size and color. |
strip_background_color |
Facel label background color. |
caption_family, caption_face, caption_size, caption_margin |
Plot caption family, face, size and margin. |
axis_text_size |
Font size of axis text. |
axis_title_family, axis_title_face, axis_title_size |
Axis title font family, face and size. |
axis_title_just |
Axis title font justification, one of |
plot_margin |
Plot margin (specify with |
grid_col, axis_col |
Grid and axis colors; defaults: |
grid |
Panel grid ( |
panel_background_color |
Panel background fill color; default to |
panel_border_color |
Panel border color; default to |
legend_background_color |
Legend background fill color; default to |
legend_border_color |
Legend border color; default to |
axis |
Add x or y axes? |
ticks |
Ticks: if |
All font sizes are set in points and colors are either a color name or a hex code.
A ggplot2
theme.
## Not run:
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()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.