UNHCR [ggplot2] theme following brand recommendations
Source:R/theme_unhcr.R
, R/theme_unhcr_map.R
theme_unhcr.Rd
theme_unhcr
provides a basic UNHCR theme
to use in ggplot2 commands.
theme_unhcr
provides a basic UNHCR theme
to use with map made using ggplot2.
Usage
theme_unhcr(
font_size = 9,
font_family = "Lato",
line_size = 0.5,
rel_small = 8/9,
rel_tiny = 7/9,
rel_large = 12/9,
grid = TRUE,
axis = "x",
axis_text = TRUE,
axis_title = TRUE,
axis_ticks = FALSE,
legend = TRUE,
legend_title = FALSE
)
theme_unhcr_map(
font_size = 14,
font_family = "Lato",
line_size = 0.5,
rel_small = 12/14,
rel_tiny = 11/14,
rel_large = 16/14,
legend = TRUE,
legend_title = FALSE
)
Arguments
- font_size
Base font size
- font_family
Base font family, default "Lato"
- line_size
Base line size for axis. Gridlines are line_size/2
- rel_small
Relative size of small text (e.g., axis labels)
- rel_tiny
Relative size of tiny text (e.g., caption)
- rel_large
Relative size of large text (e.g., title)
- grid
Turn on and off the grids. "X" or "Y" for major and "x" or "y" for minor
- axis
Turn on and off axis. Use "X" or "Y" to have only the correspondent active
- axis_text
Turn on and off axis. Use "X" or "Y" to have only the correspondent active
- axis_title
Turn on and off axis. Use "X" or "Y" to have only the correspondent active
- axis_ticks
Turn on and off ticks. Use "X" or "Y" to have only the correspondent active
- legend
Turn on and off the legend, default TRUE.
- legend_title
Turn on and off title of the legend, default FALSE.
Examples
if (FALSE) {
library(ggplot2)
ggplot(mpg, aes(displ, hwy)) +
geom_point() +
theme_unhcr()
}