merged upstream
This commit is contained in:
commit
3bf4c2e336
@ -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]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user