make labeling the trace slightly more efficient

This commit is contained in:
Sebastian Wehling-Benatelli 2015-07-13 06:36:33 +02:00
parent ae563454af
commit 641cb498f0

View File

@ -468,10 +468,9 @@ class MainWindow(QMainWindow):
wfst = self.getData().getWFData().select(component=comp) wfst = self.getData().getWFData().select(component=comp)
self.getPlotWidget().plotWFData(wfdata=wfst, title=title) self.getPlotWidget().plotWFData(wfdata=wfst, title=title)
self.draw() self.draw()
pos = self.getPlotWidget().getPlotDict().keys() plotDict = self.getPlotWidget().getPlotDict()
labels = [] pos = plotDict.keys()
for i in range(0, len(wfst)): labels = [plotDict[n][0] for n in pos]
labels.append(wfst[i].stats.station)
self.getPlotWidget().setYTickLabels(pos, labels) self.getPlotWidget().setYTickLabels(pos, labels)
def plotZ(self): def plotZ(self):