Merge pull request #696 from campagnola/scatter-stepmode

Fix error when using PlotDataItem with both stepMode and symbol
This commit is contained in:
Luke Campagnola 2018-05-31 09:13:01 -07:00 committed by GitHub
commit c582fab9c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: