x = mu + sigma * np.random.randn(N)
rects = plt.bar(list(range(N)), x, align='center')
for i in range(50):
    x = mu + sigma * np.random.randn(N)
for rect, h in zip(rects, x):
    rect.set_height(h)
fig.canvas.draw()
fig = plt.figure()
win = fig.canvas.manager.window
win.after(100, animated_barplot)
plt.show()
Обновление гистограммы matplotlib?