Python - animation with matplotlib.pyplot

前端 未结 3 815
心在旅途
心在旅途 2020-12-13 14:25

How can one create animated diagrams using popular matplotlib library? I am particularly interested in animated gifs.

3条回答
  •  醉梦人生
    2020-12-13 14:59

    This question is kind of old but nevertheless I will answer just in case someone crash here and this can be useful.

    So nowadays it seems that the best way to go in matplotlib is to use the functionality that they provide:

    http://matplotlib.org/api/animation_api.html#module-matplotlib.animation

    They also include some useful examples which you can easily modify for your needs (Though the explanation on how they work will be hard to grasp if you haven't used matplotlib in a class oriented way):

    http://matplotlib.org/examples/animation/

    Finally just to complement this information Jake VanderPlas has a more complete tutorial and a brief review on the future of visualization in Python:

    Tutorial: http://jakevdp.github.io/blog/2012/08/18/matplotlib-animation-tutorial/

    Essay about visualization: http://jakevdp.github.io/blog/2013/03/23/matplotlib-and-the-future-of-visualization-in-python/

提交回复
热议问题