This commit is contained in:
Luke Campagnola 2013-02-10 21:04:00 -05:00
parent 6e5c5e402b
commit 22bc2333a8
5 changed files with 12 additions and 5 deletions

View File

@ -27,6 +27,7 @@ examples = OrderedDict([
('Scatter Plot', 'ScatterPlot.py'),
#('PlotItem', 'PlotItem.py'),
('IsocurveItem', 'isocurve.py'),
('GraphItem', 'GraphItem.py'),
('ImageItem - video', 'ImageItem.py'),
('ImageItem - draw', 'Draw.py'),
('Region-of-Interest', 'ROIExamples.py'),

View File

@ -4,7 +4,7 @@ PyQtGraph - Scientific Graphics and GUI Library for Python
www.pyqtgraph.org
"""
__version__ = '0.9.5'
__version__ = None
### import all the goodies and add some helper functions for easy CLI use

View File

@ -204,7 +204,8 @@ class GraphicsItem(object):
return tuple(map(Point, self._pixelVectorCache[1])) ## return a *copy*
## check global cache
key = (dt.m11(), dt.m21(), dt.m31(), dt.m12(), dt.m22(), dt.m32(), dt.m31(), dt.m32())
#key = (dt.m11(), dt.m21(), dt.m31(), dt.m12(), dt.m22(), dt.m32(), dt.m31(), dt.m32())
key = (dt.m11(), dt.m21(), dt.m12(), dt.m22())
pv = self._pixelVectorGlobalCache.get(key, None)
if direction is None and pv is not None:
self._pixelVectorCache = [dt, pv]

View File

@ -472,8 +472,8 @@ class ScatterPlotItem(GraphicsObject):
if isinstance(symbol, np.ndarray) or isinstance(symbol, list):
symbols = symbol
if kargs['mask'] is not None:
symbols = symbols[kargs['mask']]
if mask is not None:
symbols = symbols[mask]
if len(symbols) != len(dataSet):
raise Exception("Number of symbols does not match number of points (%d != %d)" % (len(symbols), len(dataSet)))
dataSet['symbol'] = symbols
@ -554,6 +554,7 @@ class ScatterPlotItem(GraphicsObject):
#rec['fragCoords'] = self.fragmentAtlas.getSymbolCoords(*self.getSpotOpts(rec))
if invalidate:
self.invalidate()
self.informViewBoundsChanged()
def getSpotOpts(self, recs, scale=1.0):
if recs.ndim == 0:
@ -671,6 +672,7 @@ class ScatterPlotItem(GraphicsObject):
GraphicsObject.viewTransformChanged(self)
self.bounds = [None, None]
self.fragments = None
self.informViewBoundsChanged()
def generateFragments(self):
tr = self.deviceTransform()

View File

@ -298,9 +298,11 @@ class ViewBox(GraphicsWidget):
def resizeEvent(self, ev):
#self.setRange(self.range, padding=0)
#self.updateAutoRange()
self._itemBoundsCache.clear()
self.updateMatrix()
self.sigStateChanged.emit(self)
self.background.setRect(self.rect())
#self.linkedXChanged()
#self.linkedYChanged()
@ -728,7 +730,8 @@ class ViewBox(GraphicsWidget):
def itemBoundsChanged(self, item):
self._itemBoundsCache.pop(item, None)
self.updateAutoRange()
if item in self.addedItems:
self.updateAutoRange()
def invertY(self, b=True):
"""