Skip to content
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

Set numeric time for transition_time but display date in label? #389

Open
jzelner opened this issue Apr 30, 2020 · 1 comment
Open

Set numeric time for transition_time but display date in label? #389

jzelner opened this issue Apr 30, 2020 · 1 comment
Labels

Comments

@jzelner
Copy link

jzelner commented Apr 30, 2020

Hi - I'm trying to produce an animated map in gganimate in which each frame represents a day, but I want to control the speed in a specific way: 5x speed from the beginning until 2 weeks before the end and then 1x speed thereafter. I can do this with a numeric index by increasing the spacing at the later frames, but cannot figure out how to do this and still have the date displayed in the title using {frame_time} in labs. Any suggestions would be greatly appreciated!

@fabiobardin
Copy link

Hi Jon. I dont know how to do with one specific R comand but I have 2 ideas:

  • You can do 2 different animation ( 1 for first 2 week and 1 for rest) for that you must agregate 2 lines:

a1<-animate(Plot, fps = 5, duration = 7,renderer = av_renderer())
#if you do not put render the you have a gif format
#You can play with duration depend on number of data of second animation
anim_save("a1.mp4", a1)
Then you can join 2 animation with any video editor

  • That is not my favourite but you can repeat the data of the second part 5 times within the visualization

Best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants