Can someone point me to the "best" way to dynamically update a 2D [image] array (think of cellular automata)? E.g., this simple example works, but gets sluggish after several iterations:
import numpy as N import pylab as P nx = 20 ny = 20 c = N.zeros(nx*ny, dtype='int8') c.resize(ny,nx) iters = 50 for its in range(iters): ix0 = N.random.rand()*nx iy0 = N.random.rand()*ny c[iy0,ix0] = 1 P.imshow(c,interpolation='nearest') P.draw() I'm guessing I'll want to use the mpl's API, but unsure of the best approach. I'm currently using mpl 0.98.5. thanks, Randy ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users