From 01c556562e617431f338ca3e6450ae3fb4e485c2 Mon Sep 17 00:00:00 2001 From: marcel Date: Fri, 9 Jun 2017 13:51:20 +0200 Subject: [PATCH] [bugfix] newer version of pyqtgraph could not cope with UTCDatetime, now min/max_range for axes working --- pylot/RELEASE-VERSION | 2 +- pylot/core/util/widgets.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pylot/RELEASE-VERSION b/pylot/RELEASE-VERSION index dc5ac6e8..9515eb1e 100644 --- a/pylot/RELEASE-VERSION +++ b/pylot/RELEASE-VERSION @@ -1 +1 @@ -b061-dirty +8e83-dirty diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index 33f4a79c..60257c90 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -488,8 +488,8 @@ class WaveformWidgetPG(QtGui.QWidget): plots = [] try: - self.plotWidget.getPlotItem().vb.setLimits(xMin=wfstart, - xMax=wfend, + self.plotWidget.getPlotItem().vb.setLimits(xMin=float(0), + xMax=float(wfend-wfstart), yMin=-0.5, yMax=len(nsc)+0.5) except: @@ -533,11 +533,11 @@ class WaveformWidgetPG(QtGui.QWidget): def setXLims(self, lims): vb = self.plotWidget.getPlotItem().getViewBox() - vb.setXRange(lims[0], lims[1], padding=0) + vb.setXRange(float(lims[0]), float(lims[1]), padding=0) def setYLims(self, lims): vb = self.plotWidget.getPlotItem().getViewBox() - vb.setYRange(lims[0], lims[1], padding=0) + vb.setYRange(float(lims[0]), float(lims[1]), padding=0) def setYTickLabels(self, pos, labels): ticks = zip(pos, labels)