Animation¶
PlotnineAnimation¶
- class plotnine_extra.PlotnineAnimation(plots, interval=200, repeat_delay=None, repeat=True, blit=False)[source]¶
Bases:
ArtistAnimationAnimation using ggplot objects
- Parameters:
plots (Iterable[ggplot]) – ggplot objects that make up the the frames of the animation
interval (int) – Delay between frames in milliseconds. Defaults to 200.
repeat_delay (int) – If the animation in repeated, adds a delay in milliseconds before repeating the animation. Defaults to None.
repeat (bool) – Controls whether the animation should repeat when the sequence of frames is completed. Defaults to True.
blit (bool) – Controls whether blitting is used to optimize drawing. Defaults to False.
Notes
The plots should have the same facet and the facet should not have fixed x and y scales.
The scales of all the plots should have the same limits. It is a good idea to create a scale (with limits) for each aesthetic and add them to all the plots.