Title: | CCCM `ggplot2` Theme and Colour Palettes |
---|---|
Description: | `ggplot2` theme and color palettes following the CCCM Design Guide. |
Authors: | Cédric Vidonne [aut, cre], UNHCR [cph] |
Maintainer: | Cédric Vidonne <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.0.9000 |
Built: | 2024-10-21 03:31:43 UTC |
Source: | https://github.com/unhcr-dataviz/cccmthemes |
theme_cccm
provides a basic CCCM theme
to use in ggplot2 commands.
theme_cccm( font_family = "Inter", font_size = 12, plot_title_size = rel(1.35), plot_title_margin = font_size, subtitle_size = font_size, subtitle_margin = font_size * 1.5, strip_text_size = rel(0.9), strip_text_face = "bold", strip_text_just = 0, caption_size = rel(0.7), caption_margin = font_size, axis_text = TRUE, axis_text_size = rel(0.9), axis_title = TRUE, axis_title_size = rel(0.8), axis_title_face = "bold", axis = FALSE, axis_ticks = FALSE, grid = "XY", legend = TRUE, legend_text_size = rel(0.9), legend_title = FALSE, legend_title_size = rel(0.9), plot_margin = font_size, plot_background = "#F5F3E8", void = FALSE )
theme_cccm( font_family = "Inter", font_size = 12, plot_title_size = rel(1.35), plot_title_margin = font_size, subtitle_size = font_size, subtitle_margin = font_size * 1.5, strip_text_size = rel(0.9), strip_text_face = "bold", strip_text_just = 0, caption_size = rel(0.7), caption_margin = font_size, axis_text = TRUE, axis_text_size = rel(0.9), axis_title = TRUE, axis_title_size = rel(0.8), axis_title_face = "bold", axis = FALSE, axis_ticks = FALSE, grid = "XY", legend = TRUE, legend_text_size = rel(0.9), legend_title = FALSE, legend_title_size = rel(0.9), plot_margin = font_size, plot_background = "#F5F3E8", void = FALSE )
font_family |
Base font family "Inter". You need to have "Inter" font installed on your device in order to use it. |
font_size |
Base font size in pt. Default to 12 pts. |
plot_title_size |
Plot title font size. Default to |
plot_title_margin |
Plot title bottom margin. Default to |
subtitle_size |
Plot subtitle font size. Default to |
subtitle_margin |
Plot subtitle bottom margin. Default to |
strip_text_size |
Facet label font size. Default to |
strip_text_face |
Facet label font face. Default to "bold". |
strip_text_just |
Facet label justification. Default to 0. |
caption_size |
Caption font size. Default to |
caption_margin |
Caption top margin. Default to |
axis_text |
Logical |
axis_text_size |
Axis label font size. Default to |
axis_title |
Logical |
axis_title_size |
Axis title font size. Default to |
axis_title_face |
Axis title font face. Default to "bold". |
axis |
Logical |
axis_ticks |
Logical |
grid |
Logical |
legend |
Logical |
legend_text_size |
Legend key font size. Default to |
legend_title |
Logical |
legend_title_size |
Legend title font size. Default to |
plot_margin |
Plot margin (specify with |
plot_background |
Plot background. Put "transparent" for no background color. Default to "ecruwhite". |
void |
Logical |
The theme style
## Not run: library(ggplot2) ggplot(mpg, aes(displ, hwy)) + geom_point() + theme_cccm() ## End(Not run)
## Not run: library(ggplot2) ggplot(mpg, aes(displ, hwy)) + geom_point() + theme_cccm() ## End(Not run)