merged upstream

This commit is contained in:
Luke Campagnola 2012-04-23 10:15:30 -04:00
commit 3bf4c2e336
2 changed files with 8 additions and 5 deletions

View File

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

View File

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