Main presentation title

knitr::opts_chunk$set(echo = FALSE, fig.cap = TRUE)
library(officedown)
library(unhcrthemes)
library(ggplot2)
library(rvg)
library(tidyverse)
library(scales)

Table

head(iris)
head(iris)

ggplot in right column

mygg <-
  ggplot(
    mtcars,
    aes(x = hp, y = mpg, color = as.factor(cyl))
  ) +
  geom_point(alpha = .8) +
  labs(
    title = "Simple scatterplot with ggplot",
    subtitle = "This plot shows the default style of theme_unhcr()",
    x = "Horsepower (hp)",
    y = "Fuel efficiency (mpg)",
    color = "Number of cylinder",
    caption = "Source: mtcars"
  ) +
  scale_color_unhcr_d() +
  theme_unhcr(legend_title = TRUE)

dml(ggobj = mygg, fonts = list(serif = "Lato"))

Slide with ggplot 1

dml(ggobj = mygg, fonts = list(serif = "Lato"))

Slide with ggplot 2

dml(ggobj = mygg, fonts = list(serif = "Lato"))

ggplot in left column

dml(ggobj = mygg, fonts = list(serif = "Lato"))

ggplot in right column

dml(ggobj = mygg, fonts = list(serif = "Lato"))

ggplot in both columns

dml(ggobj = mygg, fonts = list(serif = "Lato"))
dml(ggobj = mygg, fonts = list(serif = "Lato"))

custom plot locations

dml(ggobj = mygg, fonts = list(serif = "Lato"))
dml(ggobj = mygg, fonts = list(serif = "Lato"))


Try the unhcrdown package in your browser

Any scripts or data that you put into this service are public.

unhcrdown documentation built on April 3, 2025, 10:49 p.m.