.. _sphx_glr_auto_examples_plot_svganimate.py: animatesvg ========== Create animation from a list of svg files or a list of matplotlib figures. From svg file list ------------------ .. code-block:: python from beampy import * # Remove quiet=True to get beampy compilation outputs doc = document(quiet=True) with slide('Animation from svg files'): animatesvg("./ressources/svg_anims/*.svg", width="600") display_matplotlib(gcs()) .. image:: /auto_examples/images/sphx_glr_plot_svganimate_001.png :align: center From matplotlib figure list ---------------------------- .. code-block:: python import pylab as p with slide('Animation from matplotlib figures'): anim_figs = [] for i in range(20): fig = p.figure() x = p.linspace(0,2*p.pi) p.plot(x, p.sin(x+i)) p.plot(x, p.sin(x+i+p.pi)) p.close(fig) anim_figs += [fig] animatesvg(anim_figs) save('./examples_html_outputs/animatesvg.html') HTML output =========== .. raw:: html Module arguments ================ .. autoclass:: beampy.animatesvg :noindex: .. only :: html .. container:: sphx-glr-footer .. container:: sphx-glr-download :download:`Download Python source code: plot_svganimate.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: plot_svganimate.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_