Skip to content

last_animation

last_animation() -> Animation

Return the animation :func:animate made last (gganimate last_animation).

Returns:

Raises:

  • ExportError –

    If no animation was made yet in this session.

Examples:

>>> from ggrust import *
>>> data = {"year": [2021, 2022, 2023], "sold": [10, 12, 15]}
>>> plot = ggplot(data, aes("year", "sold")) + geom_col() + transition_manual("year")
>>> animation = animate(plot)
>>> last_animation() is animation
True