... transition_states and provide a relative length to use for transition and state view. As not all combinations of data are present there are states missing a box. We define that when a box appears it should fade into view, whereas it should shrink away when it disappears. Lastly, we decide to use a sinusoidal easing for all our aesthetics (here, only y is changing) gganimate is available on CRAN and can be installed with install.packages('gganimate').