-
Notifications
You must be signed in to change notification settings - Fork 316
Closed
Description
Finally I have a chance to play with this package and think about better integration with knitr: https://twitter.com/thomasp85/status/1021462758007672834 :)
I don't know what chunk options you need from knitr (it appears that gganimate already works amazingly well in R Markdown), but currently I wonder if the three chunk options fig.width, fig.height, and dev can be supported (you may also need to use dpi).
```{r, fig.width=4, fig.height=10}
library(ggplot2)
library(gganimate)
ggplot(mtcars, aes(factor(cyl), mpg)) +
geom_boxplot() +
# Here comes the gganimate code
transition_states(
gear,
transition_length = 2,
state_length = 1
) +
enter_fade() +
exit_shrink() +
ease_aes('sine-in-out')
```
Metadata
Metadata
Assignees
Labels
No labels