From de9007d9c47ecec1059bc0b26a3553ad93e2a0f7 Mon Sep 17 00:00:00 2001 From: Luke Campagnola Date: Wed, 30 May 2018 18:54:31 -0700 Subject: [PATCH] Fix error when using PlotDataItem with both stepMode and symbol --- pyqtgraph/graphicsItems/PlotDataItem.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyqtgraph/graphicsItems/PlotDataItem.py b/pyqtgraph/graphicsItems/PlotDataItem.py index c85c3e5b..2faa9ac1 100644 --- a/pyqtgraph/graphicsItems/PlotDataItem.py +++ b/pyqtgraph/graphicsItems/PlotDataItem.py @@ -490,6 +490,9 @@ class PlotDataItem(GraphicsObject): self.curve.hide() if scatterArgs['symbol'] is not None: + + if self.opts.get('stepMode', False) is True: + x = 0.5 * (x[:-1] + x[1:]) self.scatter.setData(x=x, y=y, **scatterArgs) self.scatter.show() else: