.. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_save_movie.py: ============================= Saving an animation ============================= To save an animation, simply add the `save_path` kwarg and specify the path where you want to save the movie, including the extension. NOTE: this depends on having ffmpeg installed on your computer. .. code-block:: default # Code source: Andrew Heusser # License: MIT import hypertools as hyp import numpy as np data, labels = hyp.tools.load('weights', align=True) group1 = np.mean(data[:17], 0) group2 = np.mean(data[18:], 0) hyp.plot([group1, group2], animate=True, save_path='animation.mp4') .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.000 seconds) .. _sphx_glr_download_auto_examples_save_movie.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download :download:`Download Python source code: save_movie.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: save_movie.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_