Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pause between gganimate loops

Is it possible to add a pause between gganimate loops? I know we can set the interval between frames with interval, but is there a way to pause on the final frame before looping back to the first frame?

Is the best method to insert multiple copies of the final frame into the data?

like image 993
willk Avatar asked Dec 06 '17 19:12

willk


1 Answers

In recent versions of gganimate, the animate() function has an end_pause option. So you can simply do

animate(p, end_pause = 30)

in order to pause for, for example, 30 frames before looping again.

like image 159
NickCHK Avatar answered Sep 23 '22 12:09

NickCHK