Re: [Matplotlib-users] Hiding line plots

2008-07-10 Thread Antonio Gonzalez
Søren Nielsen wrote: > Is there a way I can hide a line plot? I have several line plots, and I > want to make a function to enable or disable a plot.. How do I tell each > line apart and remove/reinsert them? Try this in an interactive session, and see if it helps: ax = figure().add_subplot(11

Re: [Matplotlib-users] Hiding line plots

2008-07-10 Thread Michael Droettboom
When you create the plot, it returns a list of line objects. You can use this object to remove itself from the axes, and add it back it later. Hope this helps:: In [1]: l1 = plot([1,2,3]) In [2]: l2 = plot([4,5,6]) In [4]: l1 Out[4]: [] # Remove the first plot In [6]: l1[0].remove() # Put

[Matplotlib-users] Hiding line plots

2008-07-10 Thread Søren Nielsen
Hi, Is there a way I can hide a line plot? I have several line plots, and I want to make a function to enable or disable a plot.. How do I tell each line apart and remove/reinsert them? Anyone tried this? I was seeking for a line ID of somekind in matplotlib.lines... but didn't see any. Thanks,