Closed bbcuffer closed 1 year ago
I took a look at this. The error was triggered when animating the geom_point
layer, because GeomPoint's default_aes
for fill is NA
(i.e. a logical constant), while part of the transformation done by enter_fade
(see gganimate:::transmute_fade
for details) involves applying alpha()
on various other aesthetic mappings. In particular, the following code
x$fill[no_alpha] <- alpha(x$fill[no_alpha], alpha)
will convert a column of NA
s to NA_character_
s, which leads to the error when vec_rbind()
tries to combine a dataframe of original points (where the fill column is logical) with a dataframe of tweened points (where the fill column has become character).
Changing geom_point()
to geom_point(fill = NA_character_)
in the example would mitigate the issue here. In the long run, though, it may be worthwhile to include some check on the input & output column classes within gganimate:::transmute_fade
.
I had the same error today and i have tried the suggested solution and I had another error: _Error in transform_path(data[0, ], data, ease, enterlength, NULL, enter, : The transformr package is required to tween paths and lines
@tnguyenqh as the message indicates you need to install the transformr package
This has been fixed in the dev version of tweenr
This example (from the help for
transition_reveal
) works forenter_grow
but not forenter_fade
.All good to there. But
results in
My setup is as follows: