Skip to content

Support animations #61

@timhoffm

Description

@timhoffm

To visualize animations in notebooks on

from IPython.display import HTML

[...]

ani = matplotlib.animation.FuncAnimation(fig, animate, frames=FRAMES)
plt.close(fig)  # prevent ipython from drawing the static figure
HTML(ani.to_jshtml())

It would be nice to adapt the logic so that if the return value of the last statement is an Animation, automatically turn that animation into HTML and display it, so that the user doesn't have to do all the above boilerplate and can just write

matplotlib.animation.FuncAnimation(fig, animate, frames=FRAMES)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions