Re: [Matplotlib-users] updating an image plot

2010-05-21 Thread Jae-Joon Lee
set_array method only update the underlying array, and no more. The problem is that, the first imshow results in clim=(0,0) and set_array does not change this. You may manually update the clim of the image, or you may explicitly call autoscale() after set_array. Regards, -JJ On Fri, May 21, 2

[Matplotlib-users] updating an image plot

2010-05-21 Thread Chiara Caronna
Hi, I am trying to update the image plotted in a figure. From what I understood, this code should do the job: import pylab as p image=p.zeros((20,20)) p.ion() ax=p.imshow(image) p.draw() for i in range(10): print i p.ion() image[i,:]=i ax.set_array(image) p.draw() But the image is not u