So the problem comes from the fact that [n,X,V]
is a list with no set_data
method. As far as I am aware, there is no easy way to "update" a histogram in the way you describe without manually reordering and organising the underlying Patches
objects.
You would be just as well clearing the axis are replotting each time:
This:
[n,X, V].set_data(stat)// problem here!!!!!!!
plt.draw()
becomes:
ax.cla()
[n,X, V]=ax.hist(stat,bins=33,normed=True)
plt.draw()
Assuming that stat
is an array that you want to histogram.