question on wxChoice/ wxPyPlot

being a newbie that i am, i would to make sure that what i have done is correct, are the ifs in the choice event in the code below??? what i want to do:

1.get what the user selected choice and that selected choice would refer to a list

2.the list in turn would be copied to temporary list

3.the two temporary lists will then be plotted using wxPyPlot since i’m still using

BOA 0.3.1/wxpython2.4.2.4

also, if there’s any of you who tried wxPyPlot, please help

any help will be greatly appreciated!!! thank you!

attached is the complete source code of the wxFrame

wxFrame4.py (6.82 KB)

···

==========================================

def OnYaxisChoice(self, event):
self.listY = []

    if self.Yaxis.GetStringSelection() == 'Current':
        self.listY = self.current
    if self.Yaxis.GetStringSelection() == 'Voltage':
        self.listY = self.voltage
    if self.Yaxis.GetStringSelection() == 'Ambient Temp.':
        self.listY = self.temp1
    if self.Yaxis.GetStringSelection() == 'Module Temp.':
        self.listY = self.temp2
     if

self.Yaxis.GetStringSelection() == ‘Irradiance’:
self.listY = self.pyra1

    #event.Skip()

def OnXaxisChoice(self, event):
self.listX = []

    if self.Xaxis.GetStringSelection() == 'Current':
        self.listX = self.current
    if self.Xaxis.GetStringSelection() == 'Voltage':
        self.listX = self.voltage
    if self.Xaxis.GetStringSelection() == 'Ambient Temp.':
        self.listX = self.temp1
    if self.Xaxis.GetStringSelection() == 'Module Temp.':
        self.listX = self.temp2
     if

self.Xaxis.GetStringSelection() == ‘Irradiance’:
self.listX = self.pyra1
#event.Skip()

def OnOKButton(self, event):

    self.lines = Polyline(zip(self.listY,self.listX),legend='That Line Name', colour='RED', width=1)
    self.graphs= PlotGraphics([self.lines],'The whole graph name')
    self.plotCanvas1.draw(self.graphs,xAxis="X-LABEL",yAxis="Y-LABEL")

Do you Yahoo!?

Make Yahoo! your home page