I posted this question few months ago and I didn't receive any
answer, so I'll try to rephrase my problem.
I have a GUI written in wxPython, the main portion of it is a
matplotlib canvas. There is a tree control on the left with
checkboxes: if the user checks a checkbox, I add a line on the plot.
So far so good. The problem comes when the user *un-checks* the
checkbox. I would like to remove the line from the plot, but the only
way I found to do it is to do:
Which is not very nice (and not very correct), as it seems to me that
the line is still there (invisible, but still there). Am I right or
have I completely misunderstood the set_linestyle behavior? If this
method is not correct, is there any alternative that I could try to
erase completely the line from the plot (and from the legend,
The alternative of replotting everything just because a line should be
erased came into my mind but I discarded it because it is
fantastically time consuming with my graphs.
Thank you for every hint.
"Imagination Is The Only Weapon In The War Against Reality."