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
2
votes
0 answers

Unable to view animated plots in R studio

I am trying to learn how to animate plots (using an animation showing movement by quarters of the year) After running Option #1 below, the plot pane of R Studio does not do anything. I was expecting it to play an animated plot, transitioning quarter…
ActuaryGuy
  • 23
  • 1
  • 5
2
votes
1 answer

Animate points and regression line along date with gganimate()

I'm trying to animate points and a loess regression line, so they appear/are revealed simultaneously along year, but I'm returned with an error, as described below with a reprex. This would be the ideal animation:…
Will M
  • 692
  • 9
  • 20
2
votes
1 answer

gganimate: show label only for latest state

I am trying to animate a scatter plot showing only the labels for the most recent dot. What I am struggling with is to get the preceding labels disappear. I understand that 'closest_state' might be part of the answer, but as far as I can tell…
zoowalk
  • 2,018
  • 20
  • 33
2
votes
1 answer

Using gganimate to demonstrate an experiment

I'm trying to demonstrate a shortened version of an experiment for a presentation. I have a set of recorded latencies with a marked timestamp for when they were recorded during the experiment. I want to use geom_point to move a point along the…
2
votes
1 answer

How to un-alphabetize frame order in gganimate?

I have a data frame with observations each month. I would like to create a gif of the observations each month. However, in gganimate, the frames are ordered alphabetically (e.g. starting with April instead of January). How can I change the order of…
Alex Krohn
  • 71
  • 5
2
votes
1 answer

How to make y axis limits dynamic when using gganimate

I have an animated plot I want to make where the final value is much higher than the rest. I want the y axis to change with the values so that when the final value is shown it changes the y axis and shrinks the rest of the data. I tried view_follow…
2
votes
1 answer

load premade gganimate gif into rmarkdown chunk to caption

I'm trying to caption a gif as a figure caption (fig.cap) in a rmarkdown file so I can reference it in my text. The gif has been pre-made as opposed to making it within the rmd file and not sure how to load it back into a chunk. Lets say the…
user63230
  • 4,095
  • 21
  • 43
2
votes
0 answers

define fixed y axis for each facet in facet_wrap ggplot2

I am using gganimate to plot variables over time, however when using facet_wrap scales "fixed" it fixes the plot at the largest y value from all plots or for "free_y" dynamically changes but uses the largest y value from all plots. What I want to…
HaydenC
  • 107
  • 4
2
votes
0 answers

gganimate package: argument 'fps' must be a factor of 100

When I try to use the sample in gganimate package as following (copied from help("transition_manual")) anim <- ggplot(mtcars, aes(factor(gear), mpg)) +geom_boxplot() +transition_manual(gear) I get following error: Error in…
2
votes
1 answer

view_zoom_manual xmin and xmax using date r ggplot

How can I use date in view_zoom_manual, the below works but if i change step to date i get an error below Step <- c(1:50) Value <- runif(50,0,10) Final <- data.frame(Step, Value) ggplot(Final, aes(x = Step, y = Value)) + …
HaydenC
  • 107
  • 4
2
votes
0 answers

Error using magick package in r, memory allocation error

I am trying to create a multipanel animation in r and am using the magick package and gganimate to put a few GIFs together. When I try to read in the GIFs I get this error Is there anything I can do to get around…
sea83
  • 81
  • 5
2
votes
1 answer

Issue with animating geom_bar using gganimate

I am having an issue with gganimate and I would like some help, please. I am trying to display a bar plot and then animate it over some years but I have no output and no error displayed. Is there a bug or am I missing something? I am using data…
B.Sarah
  • 119
  • 1
  • 3
  • 11
2
votes
1 answer

Rotating through multiple Y Variables in gganimate

I'm currently trying to animate a plot using gganimate but am struggling to figure out how I would rotate through multiple y variables. The following data was collected from twitter scraping which allowed me to calculate a "sentiment score" based on…
2
votes
1 answer

Consistent size for symbols in ggsave and gganimate's 'animate'

My end goal is to create two outputs: 1) A static image showing all of my data, saved as a png 2) An animation of my data, saved as a gif. I'm using ggplot2 and gganimate and I'm puzzled as to why the symbol size is not consistent between the two…
Nova
  • 5,423
  • 2
  • 42
  • 62
2
votes
1 answer

How to use GGanimate to animate between a list of data frames?

I'm trying to graph spend and profitability data for a set of ads on a daily basis over time. For a given date range, I loop through the range and create a date frame. Each of these tables are appended to a list as separate data frames. Here is…