Skip to content

Instantly share code, notes, and snippets.

@han-tun
Forked from riinuots/slickr_ggplots.Rmd
Created June 4, 2020 16:25
Show Gist options
  • Save han-tun/5306497b4eb1ae75c72c3c3981ff3107 to your computer and use it in GitHub Desktop.
Save han-tun/5306497b4eb1ae75c72c3c3981ff3107 to your computer and use it in GitHub Desktop.
---
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r message=FALSE, warning=FALSE}
library(tidyverse)
library(svglite)
library(slickR)
p1 = ggplot(iris, aes(x = Species, y = Sepal.Length)) + geom_point()
p2 = ggplot(iris, aes(x = Species, y = Sepal.Width)) + geom_point()
p1 = xmlSVG({show(p1)}, standalone = TRUE, height = 4, width = 4)
p2 = xmlSVG({show(p2)}, standalone = TRUE, height = 4, width = 4)
slickR(list(p1, p2), height = 400) + settings(dots = TRUE, autoplay = TRUE)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment