I just filed a bug related with this. https://sourceforge.net/tracker/?func=detail&aid=2917758&group_id=80706&atid=560720
I think the possible solution could be 1) we keep the copied version of the input data as a cache, and provide a api to access the cache. 2) Or forsce set_[x|y]data to always update. My current inclination is the option 1. If there is any other opinion, I'll go ahead and make a change in a few days. -JJ On Tue, Dec 15, 2009 at 9:12 AM, Antonino Ingargiola <trite...@gmail.com> wrote: > Hi to all, > > I'm doing a simple animation like this: > > -- > ion() > x = arange(0,2,0.01) > y = zeros_like(x) > y[45:55]=1 > l, = plot(x,y) > > D = 0.1 > h = x[1]-x[0] > dt = 0.0001; > > def nabla(v,h): > na = zeros_like(v) > na[1:-1] = (v[2:]-2*v[1:-1]+v[:-2]) > na[0],na[-1] = 0,0 > return na/(h**2) > > for i in range(1000): > y = y + D*nabla(y,h)*dt > if i%10 == 0: > l.set_ydata(y) > draw() > -- > > however, changing the line > > y = y + D*nabla(y,h)*dt with > > in > > y += D*nabla(y,h)*dt > > the plot is not updated anymore. I have to replace l.set_ydata(y) with > y.recache() to make the the animation work again. > > I think this is a bug since the line should be updated even using the > += operator. > > Regards, > Antonio > > ------------------------------------------------------------------------------ > Return on Information: > Google Enterprise Search pays you back > Get the facts. > http://p.sf.net/sfu/google-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users