Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: Ignoring unknown aesthetics: frame // Use for gganimate #37

Closed
gresch opened this issue Jan 16, 2017 · 4 comments
Closed

Warning: Ignoring unknown aesthetics: frame // Use for gganimate #37

gresch opened this issue Jan 16, 2017 · 4 comments
Milestone

Comments

@gresch
Copy link

gresch commented Jan 16, 2017

I use gganimate to animate a ggplot2 graph. However, blogdown generates separate pictures (as many pics as given in the frame input) instead of one animated GIF.

@yihui
Copy link
Member

yihui commented Jan 26, 2017

Is this issue specific to blogdown? i.e. is it reproducible in a normal R Markdown document?

@gresch
Copy link
Author

gresch commented Jan 26, 2017

  1. please find a working R Markdown/ notebook under [1]; cf. section animated plots
  2. the same for a blogdown version under [2]; cf. section animated plots

in the R markdown it is working as expected (animated GIF), for blogdown a number of static images is generated.

[1] https://cdn.rawgit.com/gresch/r_playground/52ebec03/gganimate/201611_gganimate_Packages%20functionality%20examples%20using%20Gapminder%20data.nb.html
[2] https://gresch.github.io/2016/11/22/201611_gganimate_packages_functionality_examples_using_gapminder_data/

@RobertMyles
Copy link

I've got this problem too, although it doesn't seem to be restricted to blogdown, it's also happening whenever I try to knit the document or when I published it as an RPub. When I try build_site() or serve_site(), I get an error:

Execution halted
Error in render_page(f) : 
  Failed to render '2017-05-22-earth.Rmd'

@yihui
Copy link
Member

yihui commented Aug 22, 2017

I'm not very familiar with the codebase of gganimate, so I'll defer this issue to @dgrtwo. Before he chimes in, here is another method you can use, which requires the installation of FFmpeg:

```{r gapminder, fig.show='animate', ffmpeg.format='gif', dev='jpeg'}
library(gapminder)
library(ggplot2)
theme_set(theme_bw())
p <- ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, color = continent, frame = year)) +
  geom_point() +
  scale_x_log10()

library(gganimate)
gganimate(p)
```

@yihui yihui closed this as completed Aug 22, 2017
@yihui yihui added this to the v0.1 milestone Aug 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants