Re: [Matplotlib-users] Line update: set_data vs recache issue

2009-12-28 Thread Jae-Joon Lee
On Mon, Dec 28, 2009 at 12:39 AM, Eric Firing wrote: > So, which way is better?  I assume the change is an improvement, because >  the behavior with a list should be the same as with an ndarray. > I agree with you. > > We could split the recaching up into parts that can be done independently on

Re: [Matplotlib-users] Line update: set_data vs recache issue

2009-12-27 Thread Eric Firing
Jae-Joon Lee wrote: > On Sun, Dec 27, 2009 at 7:31 PM, Eric Firing wrote: >> I don't understand what your script, below, is intended to do or show. I >> haven't run it with mpl prior to my change. With the change, it simply >> draws a single line, or at least that is all I see on the plot. > > B

Re: [Matplotlib-users] Line update: set_data vs recache issue

2009-12-27 Thread Jae-Joon Lee
On Sun, Dec 27, 2009 at 7:31 PM, Eric Firing wrote: > I don't understand what your script, below, is intended to do or show. I > haven't run it with mpl prior to my change.  With the change, it simply > draws a single line, or at least that is all I see on the plot. Before your change, it draws t

Re: [Matplotlib-users] Line update: set_data vs recache issue

2009-12-27 Thread Eric Firing
Eric Firing wrote: >> I went ahead and committed (svn rev 8054) changes that I think address >> the problem, and that should slightly improve speed as well in some >> cases, without slowing anything down in other reasonable cases--unless >> there are subtleties I am missing. Or maybe I am missi

Re: [Matplotlib-users] Line update: set_data vs recache issue

2009-12-27 Thread Eric Firing
> > I went ahead and committed (svn rev 8054) changes that I think address > the problem, and that should slightly improve speed as well in some > cases, without slowing anything down in other reasonable cases--unless > there are subtleties I am missing. Or maybe I am missing something > bla

Re: [Matplotlib-users] Line update: set_data vs recache issue

2009-12-27 Thread Eric Firing
Jae-Joon Lee wrote: > On Sun, Dec 27, 2009 at 2:37 PM, Eric Firing wrote: >> What are the circumstances under which one would call set_data() and not >> want or need an update? > > If you ask me, I'm +1 to update the plot always. But, apparently, the > original author of this code wanted to do so

Re: [Matplotlib-users] Line update: set_data vs recache issue

2009-12-27 Thread Jae-Joon Lee
On Sun, Dec 27, 2009 at 2:37 PM, Eric Firing wrote: > What are the circumstances under which one would call set_data() and not > want or need an update? If you ask me, I'm +1 to update the plot always. But, apparently, the original author of this code wanted to do some checks to avoid unnecessary

Re: [Matplotlib-users] Line update: set_data vs recache issue

2009-12-27 Thread Eric Firing
Jae-Joon Lee wrote: > 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 cac

Re: [Matplotlib-users] Line update: set_data vs recache issue

2009-12-19 Thread Jae-Joon Lee
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 alw

[Matplotlib-users] Line update: set_data vs recache issue

2009-12-15 Thread Antonino Ingargiola
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 ra