Skip to content

Instantly share code, notes, and snippets.

@noamross
Last active October 27, 2018 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noamross/e7c2a5e53eefdd3da6e5682e9f0fdbc0 to your computer and use it in GitHub Desktop.
Save noamross/e7c2a5e53eefdd3da6e5682e9f0fdbc0 to your computer and use it in GitHub Desktop.
Test RVG PPTx
---
title: "Test RVG pptx"
output:
powerpoint_presentation:
keep_md: TRUE
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(ggplot2)
library(rvg)
```
## Slide with Plot
```{r plot1}
dml(plot(pressure))
```
## Slide with ggplot
```{r ggplot1}
mygg <- ggplot(pressure, aes(x = temperature, y = pressure)) +
geom_point()
dml(ggobj = mygg)
```
## Slide with ggplot
```{r}
mygg <- ggplot(pressure, aes(x = temperature, y = pressure)) +
geom_point()
dml(ggobj = mygg, layout = "full_slide")
```
## ggplot in left column
```{r}
mygg <- ggplot(pressure, aes(x = temperature, y = pressure)) +
geom_point()
dml(ggobj = mygg, layout = "left_col")
```
## ggplot in right column
- Some
- Bullets
```{r}
mygg <- ggplot(pressure, aes(x = temperature, y = pressure)) +
geom_point()
dml(ggobj = mygg, layout = "right_col")
```
## ggplot in both columns
```{r}
mygg <- ggplot(pressure, aes(x = temperature, y = pressure)) +
geom_point()
dml(ggobj = mygg, layout = "left_col")
```
```{r}
mygg <- ggplot(pressure, aes(x = temperature, y = pressure)) +
geom_point()
dml(ggobj = mygg, layout = "right_col")
```
## custom plot location
```{r}
dml(plot(pressure), layout = list(width = 2, height = 2, offx = 2, offy = 2))
```
## custom plot locations
```{r}
dml(plot(pressure), layout = list(width = 2, height = 2, offx = 2, offy = 2))
```
```{r}
dml(plot(pressure), layout = list(width = 3, height = 3, offx = 4, offy = 4))
```
## Non-editable plot
```{r}
dml(plot(pressure), editable = FALSE)
```
## Text and custom size
This is some text.
```{r}
dml(plot(pressure), layout = list(width = 9, height = 3.7, offx = 0.75, offy = 3))
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment