-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Error with ggplot2 and gganimate #5161
Comments
A more minimal reprex: library(ggplot2)
library(gganimate)
p <- ggplot(economics, aes(date, unemploy)) +
geom_area() +
transition_reveal(date)
animate(p, duration = 1, fps = 30)
#> Warning: Cannot get dimensions of plot table. Plot region might not be fixed
#> Warning: Problem while converting geom to grob.
#> ℹ Error occurred in the 1st layer.
#> Caused by error in `unit()`:
#> ! 'x' and 'units' must have length > 0 Created on 2023-01-26 with reprex v2.0.2 I think the problem can be fixed by setting library(ggplot2)
library(gganimate)
p <- ggplot(economics, aes(date, unemploy)) +
geom_area(stat = "identity") +
transition_reveal(date)
animate(p, duration = 1, fps = 30) Created on 2023-01-26 with reprex v2.0.2 But I'm not sure why gganimate errors with the default |
I think this is probably something that ought to be fixed on gganimate's side, so I'm closing this in favour of thomasp85/gganimate#476. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The animated chart does not render properly and it creates the following error messages:
Error occurred in the 1st layer.
Caused by error in
unit()
:'x' and 'units' must have length > 0
Problem while converting geom to grob.
The text was updated successfully, but these errors were encountered: