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
1 answer

gganimate change axes between frames

I am trying to plot the top 3 NHL scorers over time using gganimate. Currently, I have a column chart where the x axis shows player names and the y axis shows number of goals for each player. Here's a static version of what I…
James Martherus
  • 1,033
  • 1
  • 9
  • 20
2
votes
1 answer

Add gradients and hand-drawn effects to gganimate plot

I am interested in using gganimate with gradients and hand-drawn and painty-type fill effects (see sketchy and painty and gradients here: https://semiotic.nteract.io/guides/sketchy-painty-patterns). Is this possible? I have found that ggrough…
bill999
  • 2,147
  • 8
  • 51
  • 103
2
votes
2 answers

Error in animate.default() : animation of gg objects not supported

Getting error message Error in animate.default() : animation of gg objects not supported when running the following (from tutorial here) library(ggplot2) library(gganimate) library(gapminder) theme_set(theme_bw()) # pre-set the bw theme. g <-…
stevec
  • 41,291
  • 27
  • 223
  • 311
2
votes
2 answers

gganimate: Combining transition_layers and geom_smooth

How do I combine geom_smooth(method = "lm) function with gganimate()'s transition_layers, so that, as the individual bars drift/grow upwards, the linear line of geom_smooth appears, like so: Example of desired appearance of geom_smooth line The only…
Will M
  • 692
  • 9
  • 20
2
votes
1 answer

How to set the speed of the animation in R?

I have set up an animation using gganimate in R. This animation is just too fast. How to set the speed of the frames? Also the points disappears when showing the next dot. Is it possible that the points are show one by one so at the end I have a…
SQL Shane
  • 115
  • 4
2
votes
0 answers

How to add a regression line to a gganimate plot?

I would like to add a regression line to my gganimate plot. Without the regression the line the gganimate plot works as expected, and when I add the the geom_smooth command to the regular plot it works fine. I only receive an error when I try to add…
Liam Haller
  • 182
  • 10
2
votes
2 answers

How can I add intersection points on gganimate?

I am setting up an animation of two curves as the slope of one of them changes, and I want to show the changing intersection points at each state in the animation. I know where the intersection points are, but don't know how to include them in the…
Nikki K
  • 23
  • 3
2
votes
1 answer

Animating a Network in R

Does anyone know of a way to visualize a network (from igraph) as it evolves (i.e., new connections are made)? I've looked on https://www.r-graph-gallery.com/network/ and searched online but haven't seen anything. For example, if the network…
Frank B.
  • 1,813
  • 5
  • 24
  • 44
2
votes
1 answer

Make multiple geoms animated in ggplot

I am trying to develop an animated plot showing how the rates of three point attempts and assists have changed for NBA teams over time. While the points in my plot are transitioning correctly, I tried to add a vertical and horizontal mean line,…
2
votes
1 answer

Using tweenr and gganimate with bar plots

How do I use tweenr along with gganimate to create a very smooth animation between the two bar charts below? library(tweenr) library(gganimate) library(tidyverse) df <- tibble( decile = c("lowest", "second", "third", "lowest", "second",…
ixodid
  • 2,180
  • 1
  • 19
  • 46
2
votes
1 answer

Display different time elements at different speeds in gganimate

Using the code from this answer, How to make dots in gganimate appear and not transition, as a MWE, say we have this gganimate: library(ggplot2) library(gganimate) a <- ggplot(airquality, aes(Day, Temp, group =…
bill999
  • 2,147
  • 8
  • 51
  • 103
2
votes
1 answer

Smooth transitions between different layouts of the same network in ggraph

I would like to animate the same network using different layouts and having a smooth transition between layouts. I'd like to do this inside the gganimate framework. library(igraph) library(ggraph) library(gganimate) set.seed(1) g <-…
Ben Nutzer
  • 1,082
  • 7
  • 15
2
votes
2 answers

gganimate different fill scales in image layers

I'll use the mtcars dataset as an example. I'd like to transition between one variable (cyl) and another variable (hp) for the same data points based on fill color. However, the scale is set for the entire range between 4:335. Thus, when cyl is…
Stephen Williams
  • 561
  • 4
  • 12
2
votes
1 answer

How to create contour with wind animation using gganimate?

I have created a wind animation for each hour of a specific day (Click to play animation video). Instead of showing 19 points, I would like to create a contour plot interpolating/extrapolating using those 19 points at each hour over the entire area…
num8ers
  • 63
  • 8
2
votes
1 answer

gganimate does not show anything

I have installed the transformr and gifski packages because of my messages. How come the following code does not work? I get lots of messages with: geom_path: Each group consists of only one observation. Do you need to adjust the group…
xhr489
  • 1,957
  • 13
  • 39