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)
self.getPlotWidget().plotWFData(wfdata=wfst, title=title)
self.draw()
pos = self.getPlotWidget().getPlotDict().keys()
labels = []
for i in range(0, len(wfst)):
labels.append(wfst[i].stats.station)
plotDict = self.getPlotWidget().getPlotDict()
pos = plotDict.keys()
labels = [plotDict[n][0] for n in pos]
self.getPlotWidget().setYTickLabels(pos, labels)
def plotZ(self):