---
title: "Main presentation title"
subtitle: "Subtitle if needed"
author: "Your name"
date: "`r format(Sys.Date(),  '%d %B %Y')`"
output:
  unhcrdown::pptx_slides
---


```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, fig.cap = TRUE)
library(officedown)
library(unhcrthemes)
library(ggplot2)
library(rvg)
library(tidyverse)
library(scales)
```

## Table

```{r layout='Two Content', ph=officer::ph_location_left()}
head(iris)
```

```{r layout='Two Content', ph=officer::ph_location_right()}
head(iris)
```

## ggplot in right column


- Some
- Bullets

```{r message=FALSE, warning=FALSE, ph=officer::ph_location_right()}
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

```{r layout='Title and Content', ph=officer::ph_location_type(type="body")}
dml(ggobj = mygg, fonts = list(serif = "Lato"))
```

## Slide with ggplot 2

```{r ph=officer::ph_location_fullsize()}
dml(ggobj = mygg, fonts = list(serif = "Lato"))
```

## ggplot in left column

```{r ph=officer::ph_location_left()}
dml(ggobj = mygg, fonts = list(serif = "Lato"))
```

## ggplot in right column


- Some
- Bullets

```{r ph=officer::ph_location_right()}
dml(ggobj = mygg, fonts = list(serif = "Lato"))
```

## ggplot in both columns


```{r ph=officer::ph_location_left()}
dml(ggobj = mygg, fonts = list(serif = "Lato"))
```

```{r ph=officer::ph_location_right()}
dml(ggobj = mygg, fonts = list(serif = "Lato"))
```


## custom plot locations


```{r ph=officer::ph_location(width = 2, height = 2, left = 2, top = 2)}
dml(ggobj = mygg, fonts = list(serif = "Lato"))
```

```{r ph=officer::ph_location(width = 3, height = 3, left = 4, top = 4)}
dml(ggobj = mygg, fonts = list(serif = "Lato"))
```

