Questions tagged [gganimate]

gganimate is a package for R that allows to produce animated graphics with ggplot2. It is based on the animation package.

gganimate is a package for R that allows to produce animated graphics with ggplot2. It is based on the animation package.

Repositories:

549 questions
11
votes
1 answer

Including images on axis label in an animated ggplot2

I created an animated bar plot displaying goals scored by players (fictional). Please see the reproduced data for the example: df <- data.frame(Player = rep(c("Aguero", "Salah", "Aubameyang", "Kane"), 6), Team = rep(c("ManCity",…
Albin
  • 822
  • 1
  • 7
  • 25
11
votes
1 answer

Problem with many (>50) states in gganimate

I'm trying to create a GIF using gganimate for a data set covering 90 years, i.e. I want to have a GIF running through 90 states/years. However, it seems like gganimate is only able to deal with less than 50 states. So here's an…
andreas
  • 189
  • 2
  • 10
11
votes
1 answer

Can't transition title or transition time depending on using transition_states or transition_times in new version of gganimate

I have been playing with the new version of gganimate, I tend to use animations a lot in my classes. I am trying to build a graph that shows how Nitrous oxide changes over time in a station in Spain. I want two features in the animations Stop for a…
Derek Corcoran
  • 3,930
  • 2
  • 25
  • 54
10
votes
1 answer

Multiple gganimate plots both stacked and side by side

I have four animated plots with the same number of frames, of which I want three stacked and the fourth to the right of the three stacked animations. Normally I would use something like grid.arrange, but that does not seem to work with gganimate. I…
Abdel
  • 5,826
  • 12
  • 56
  • 77
10
votes
4 answers

Fail to render an animation

I'm trying to learn how to get a pretty animate graphic using R and gganimate, and I encounter some issue. When I try to animate my graphics, R seems to edit few PNG files, but then fail to render them. Here is an example of the code I use…
Francois51
  • 381
  • 2
  • 15
10
votes
2 answers

How does gganimate order an ordered bar time-series?

I have a time-series of data, where I'm plotting diagnosis rates for a disease on the y-axis DIAG_RATE_65_PLUS, and geographical groups for comparison on the x-axis NAME as a simple bar graph. My time variable is ACH_DATEyearmon, which the animation…
user126082
  • 310
  • 2
  • 9
10
votes
1 answer

gganimate issue with geom_bar?

I've been looking with envy and admiration at the various ggplot animations appearing on twitter since David Robinson released his gganimate package and thought I'd have a play myself. I am having an issue with gganimate when using geom_bar. …
tecb1234
  • 105
  • 4
9
votes
3 answers

Error: The animation object does not specify a save_animation method

Im trying to create a bar chart race with R following the method delow. While all the pngs are created when I try to save them as a gif file thenI get: Error: The animation object does not specify a save_animation method Does it happen because I…
firmo23
  • 7,490
  • 2
  • 38
  • 114
9
votes
2 answers

gganimate with changing scales (axis limits)

I'd like to create a gif using gganimate, but my axis ranges vary wildly in one frame. This is causing all subsequent frames to be squeezed. In ggplot2's facets, there's an option to have scales="free". Is there a way to have free scales in each…
Megatron
  • 15,909
  • 12
  • 89
  • 97
8
votes
2 answers

gganimate not showing all frames

I'd like to make a simple gif with 138 states. I don't need any fancy transitions between each state, but I do need every state to appear in my gif. Currently, gganimate is cutting my gif short, not revealing the last ~30ish states. Example df <-…
Ben
  • 20,038
  • 30
  • 112
  • 189
8
votes
2 answers

How to create and display an animated GIF in Shiny?

I'm able to load a saved file as an image but unable to use gganimate to do it directly. Alternate ways of rendering GIFs would be nice to know but knowing how to render gganimate specifically would really solve my…
TheComeOnMan
  • 12,535
  • 8
  • 39
  • 54
7
votes
1 answer

How to use your own image for geom_point in gganimate?

I am trying to use my own image for geom_point, something I can just read in. I am aware geom_point allows you to choose many shapes (well over 300) by simply writing shape = 243 but I want my own image such as a logo. When I have not specified…
user3456588
  • 609
  • 4
  • 9
7
votes
1 answer

How to stop ggrepel labels moving between gganimate frames in R/ggplot2?

I would like to add labels to the end of lines in ggplot, avoid them overlapping, and avoid them moving around during animation. So far I can put the labels in the right place and hold them static using geom_text, but the labels overlap, or I can…
monkeytennis
  • 848
  • 7
  • 18
7
votes
2 answers

set slower frame rate or longer duration for gganimate

when making animation from ggplot using gganimate, I need to set a lower pace to allow people to read data. Reading documentation (hard to find options) seems that "nframes" is the proper setting. But I can't slow the animation or set the duration.…
useRj
  • 1,232
  • 1
  • 9
  • 15
7
votes
1 answer

Prevent title space changing when animating with descender letters

I am trying to animate some monthly data using gganimate. The plots are working great, except that the presence of descenders (letters that go below the baseline, i.e. g, j, p, q, and y) changes the amount of space that the title takes up. This, in…
Mark Peterson
  • 9,370
  • 2
  • 25
  • 48
1
2
3
36 37