Commit 3bf4c2e3 authored by Luke Campagnola's avatar Luke Campagnola
Browse files

merged upstream

parents 69713078 41bc951a
......@@ -83,10 +83,13 @@ p8.addItem(lr)
p9 = win.addPlot(title="Zoom on selected region")
p9.plot(data2)
def update():
p9.setXRange(*lr.getRegion())
lr.sigRegionChanged.connect(update)
update()
def updatePlot():
p9.setXRange(*lr.getRegion(), padding=0)
def updateRegion():
lr.setRegion(p9.getViewBox().viewRange()[0])
lr.sigRegionChanged.connect(updatePlot)
p9.sigXRangeChanged.connect(updateRegion)
updatePlot()
## Start Qt event loop unless running in interactive mode or using pyside.
import sys
......
......@@ -398,7 +398,7 @@ class ScatterPlotItem(GraphicsObject):
psize = size[i]
if self.pointData is None or self.pointData[i] is None:
data = self.opts['data']
data = self.opts.get('data', None)
else:
data = self.pointData[i]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment