From 641cb498f0d5c98d967ca52a4fd2b392e24c7afa Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Mon, 13 Jul 2015 06:36:33 +0200 Subject: [PATCH] make labeling the trace slightly more efficient --- QtPyLoT.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/QtPyLoT.py b/QtPyLoT.py index de9165b7..1cd856c7 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -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):