On 11/9/06, John Hunter <[EMAIL PROTECTED]> wrote:
> >>>>> "Andrea" == Andrea Gavana <[EMAIL PROTECTED]> writes:
>
>     Andrea> Thank you guys, and thanks for the Wiki entry ;-) Andrea.
>
> Since ax.lines is just a list, you can also use the "remove" method
>
>   line1, = ax.plot(something)
>   line2, = ax.plot(somethingelse)
>   line3, line4 = ax.plot(x3, y3, x4, y4)
>
>   ax.lines.remove(line3)

With the caveat that I think this is O(N) in the length of the list,
with comparison operations at each step.  I think 'del alist[i]' is
also O(N), but amortized and with  *much* smaller constant (only cheap
internal pointer shuffling, without any real Python work).

Someone with better knowledge of the list object internals, feel free
to correct the above (I'm actually curious if the reality is
different).

Cheers,

f

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to