You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for making this package, I've been exploring it in a blog post I'm working on and it's really great! Quick question:
Do the enter and exit functions work with transition_reveal() and transition_time()?
Other transition_* functions have examples including the use of the enter and exit functions working with them, but transition_reveal() and transition_time() do not. After trying (and failing) to get enter_fade() working in a transition_reveal() animation I'm wondering if the absence in the examples is because enter and exit functions do not work with transition_reveal() and transition_time().
The use case I'm going for is to have an annotation made with geom_text() fade into the animation rather than instantly appearing. The Getting Started article on the pkgdown website states that:
enter and exit functions are used to modify the aesthetics of appearing and disappearing data so that their entrance or exit may be animated.
But this does not seem to apply for data that appears or disappears in transition_reveal() and transition_time(). Here's a reprex demonstrating this. I consider the data from geom_text() to be "appearing" on day 20 and expect the fade in to apply to it, but instead it appears instantly.
library(gganimate)
#> Loading required package: ggplot2anim<- ggplot(airquality, aes(Day, Temp)) +
geom_line(aes(group=Month)) +
geom_text(
data=data.frame(Day= as.integer(20)),
aes(x=20, y=95, group=Day),
label="It's day 20!"
) +
transition_reveal(Day) +
enter_fade("text") # This seems to do nothinganim
enter and exit sadly doesn't work with transition_reveal() for some technical reasons. I've long wondered how to make it work without finding a good solution. It should work with transition_time() though
Ah, that’s too bad. Would you be able to document what does/doesn’t work together somewhere? (maybe a table in the README, or if this is an outlier maybe just a note in the function documentation)
Thanks for making this package, I've been exploring it in a blog post I'm working on and it's really great! Quick question:
Do the
enter
andexit
functions work withtransition_reveal()
andtransition_time()
?Other
transition_*
functions have examples including the use of theenter
andexit
functions working with them, buttransition_reveal()
andtransition_time()
do not. After trying (and failing) to getenter_fade()
working in atransition_reveal()
animation I'm wondering if the absence in the examples is becauseenter
andexit
functions do not work withtransition_reveal()
andtransition_time()
.The use case I'm going for is to have an annotation made with
geom_text()
fade into the animation rather than instantly appearing. The Getting Started article on the pkgdown website states that:But this does not seem to apply for data that appears or disappears in
transition_reveal()
andtransition_time()
. Here's a reprex demonstrating this. I consider the data fromgeom_text()
to be "appearing" on day 20 and expect the fade in to apply to it, but instead it appears instantly.Created on 2021-06-26 by the reprex package (v2.0.0)
The text was updated successfully, but these errors were encountered: