-
Notifications
You must be signed in to change notification settings - Fork 315
Closed
Description
This looks related to #269, feel free to dupe-close if it's identical.
I'm trying to have a constant background reference plot using
- separate data and
- geom_area
This causes a crash related to -data$group.
Examining the stack trace suggests that the group aesthetic is assumed to be integer but something before the crashing code creates character groups instead.
data$group is constant and equal to "1" at the point of failure.
The failing function is positon_stack so geom_area is likely not the only affected geom.
library(gganimate)
library(dplyr)
p <- ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, group = Species, color = Species)) %+%
geom_area(
aes(group = NULL, color = NULL),
data = iris %>%
group_by(Sepal.Length) %>%
summarise(Sepal.Width = mean(Sepal.Width)),
alpha = 0.5
) %+%
geom_point()
pp %+%
transition_states(Species) %>%
animate(renderer = gifski_renderer(file = "temp.gif"))
#> Error in -data$group: invalid argument to unary operatorCreated on 2020-10-29 by the reprex package (v0.3.0)
Metadata
Metadata
Assignees
Labels
No labels
