Le mercredi 02 septembre 2009 à 17:41 +0200, Sebastian Rhode a écrit :
> So I already figure out how to delete the last drawn line, but this is
> not a very good solution. What I actually would need, is a selection
> which line & legend the users whats to remove from the graph (perfect
> would be interactivly directly from the graph). But so far, I could
> not figure this out. Has anyone a good ides how to achieve this?
You may try to get the line to remove with
self.gex, = self.axes.plot(ex[:,0],ex[:,1],'b', lw=2,label = mypathex)
in openex (note the comma)
To remove the line, put
self.gex.remove()
in delex function.
An alternative is
self.axes.get_lines()[-1].remove()
so that you don't need self.gex for this.
Now, you need a function to interactively select the line. I don't have
a solution for that, but I'm interested too!
--
Fabrice Silva
Laboratory of Mechanics and Acoustics - CNRS
31 chemin Joseph Aiguier, 13402 Marseille, France.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users