Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 83f4a45

Browse files
committed
Add animation display hook to whats new.
1 parent 1c99a9e commit 83f4a45

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

doc/users/whats_new.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,23 @@ Support for URL string arguments to ``imread``
8181
The ``imread`` function now accepts URL strings that point to remote PNG
8282
files. This circumvents the generation of a HTTPResponse object directly.
8383

84+
Display hook for animations in the IPython notebook
85+
---------------------------------------------------
86+
87+
`matplotlib.animation.Animation` instances gained a ``_repr_html_`` method
88+
to support inline display of animations in the notebook. The method used
89+
to display is controlled by the ``animation.html`` rc parameter, which
90+
currently supports values of ``none`` and ``html5``. ``none`` is the
91+
default, performing no display. ``html5`` converts the animation to an
92+
h264 encoded video, which is embedded directly in the notebook.
93+
94+
Users not wishing to use the ``_repr_html_`` display hook can also manually
95+
call the `to_html5_video` method to get the HTML and display using
96+
IPython's ``HTML`` display class::
97+
98+
from IPython.display import HTML
99+
HTML(anim.to_html5_video())
100+
84101

85102
.. _whats-new-1-4:
86103

0 commit comments

Comments
 (0)