ipython / ipython/matplotlib-inline

Support animations

Offen
#61 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Jupyter Notebook
Sterne
31
Forks
39
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

To visualize animations in notebooks on

```python
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

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

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.