python - Animation by using matplotlib + errorbar -
i'm trying make animation based on example. main problem don't know how connect animation errorbar. maybe has solved similar .. import numpy np import matplotlib.pyplot plt import matplotlib.animation animation line, = ax.plot(x, np.sin(x)) def animate(i): ax.errorbar(x, np.array(x), yerr=1, color='green') line.set_ydata(np.sin(x+i/10.0)) # update data return line, #init required blitting give clean slate. def init(): ax.errorbar(x, np.array(x), yerr=1, color='green') line.set_ydata(np.ma.array(x, mask=true)) return line, ani = animation.funcanimation(fig, animate, np.arange(1, 200), init_func=init, interval=25, blit=true) plt.show() import numpy np import matplotlib.pyplot plt import matplotlib.animation animation fig = gcf() ax = gca() x = np.linspace(0, 2*np.pi, 256) line, ( bottoms, tops), verts = ax.errorbar(x, np.sin(x), yerr=1) verts[0].remove() # remove vertical lines yerr = 1 def animate(i=0): #