|
From: Sebastian R. <seb...@go...> - 2009-12-09 13:06:36
|
Hi folks,
i have a problem with updating my graph. In some cases its works, but in
others the graph is not updated right away.
--------------------------------
...
def openls(self, event):
dlg = wx.FileDialog(self, "Choose a Light Source", os.getcwd(), "",
"*.txt*", wx.OPEN)
if dlg.ShowModal() == wx.ID_OK:
pathls = dlg.GetPath()
mypathls = os.path.basename(pathls)
self.SetStatusText("Selected Light Source: %s" % mypathls)
ls = numpy.loadtxt(pathls)
ls = normspec(ls)
self.gls, = self.axes.plot(ls[:,0],ls[:,1],'m-',lw=2, label =
mypathls)
self.axes.axis([xmin,xmax,ymin,ymax])
self.axes.legend(loc=4)
self.plotPanel.draw()
dlg.Destroy()
def show405(self, event):
if self.sh405.IsChecked():
self.l405, = self.axes.plot([wl[0],wl[0]],[ymin,ymax],'b', lw=2)
self.axes.axis([xmin,xmax,ymin,ymax])
self.plotPanel.draw()
...
-----------------------------------------------
openls --> the corresponding data are drwan right after pressing OK
show405 --> as soon as I check the check item, the graph is not updated
right away
If I select show405 first, I see nothing, but if I open a dataset afterwards
with openls, both graphs are shown. So the graph from show405 must be
somewhere ...
Thanks for your help.
Cheers,
Sebi
----------------------------------
Dr. Sebastian Rhode
Grünwalder Str. 103a
81547 München
Tel: +49 89 4703091
seb...@go...
|