Animations are made compiling many images one after each others. If you have to much differences between the images, the animation is not smooth. The tweenr library by Thomas Lin Pedersen makes it easy to interpolate your data between different states. It creates intermediate states, what makes the animation smooth. Here is the code allowing to get the 2 examples, using the gganimate library for the animation.

The dancing ball

The dropping ball


Not what you are looking for ? Make a new search !


Leave a Reply

1 Comment threads
0 Thread replies
Most reacted comment
Hottest comment thread
1 Comment authors
leandro Fernandes Recent comment authors
newest oldest most voted
Notify of
leandro Fernandes
leandro Fernandes

How to with version 3.5.0 ??