Animation of histograms in subplot

前端 未结 3 917
后悔当初
后悔当初 2020-12-06 08:51

I have the following animated subplots that simulate histograms of four different distributions:

import numpy
from matplotlib.pylab import *
import matplotli         


        
3条回答
  •  心在旅途
    2020-12-06 09:15

    Yeah!! I also faced the same problem, if you are getting such kind of problem don't forget to clear the axis before displaying each frame of the animation.

    use plt.cla() or ax.clear()(in your case) for each axis

    before doing the plot in the function defined for animation

提交回复
热议问题