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
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
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,