Hello,

I wrote a little program to display the spectral data of varoius filters.
Here is a part of the code:
...
def openex(self, event):
        dlg = wx.FileDialog(self, "Choose a Excitation Filter", os.getcwd(),
"", "*.ex*", wx.OPEN)
        if dlg.ShowModal() == wx.ID_OK:
            pathex = dlg.GetPath()
            mypathex = os.path.basename(pathex)
            self.SetStatusText("Selected EX: %s" % mypathex)
            ex = load(pathex)
            ex = normspec_filter(ex)
            self.gex = self.axes.plot(ex[:,0],ex[:,1],'b', lw=2,label =
mypathex)
            self.axes.axis([xmin,xmax,ymin,ymax])
            self.axes.legend(loc=4)
            self.plotPanel.draw()

        dlg.Destroy()

    def delex(self, event):

        *self.axes.lines.remove(self.gex[-1])*
        self.plotPanel.draw()
...

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?

Cheers,

Sebi

-- 
Dr. Sebastian Rhode
Grünwalder Str. 103a
81547 München
Tel: +49 89 4703091
sebrh...@googlemail.com
------------------------------------------------------------------------------
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to