From c022f3a10f767b07cc64b0cabc1cd6afded0debc Mon Sep 17 00:00:00 2001 From: Luke Campagnola <> Date: Tue, 11 Sep 2012 10:26:34 -0400 Subject: [PATCH] Bugfixes: - initialize ImageItem.menu - fixed default argument for ROI.getAffineSliceParams(axes) --- graphicsItems/ImageItem.py | 2 +- graphicsItems/ROI.py | 2 +- graphicsItems/ViewBox/ViewBox.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/graphicsItems/ImageItem.py b/graphicsItems/ImageItem.py index bc4c86ee..02fa8257 100644 --- a/graphicsItems/ImageItem.py +++ b/graphicsItems/ImageItem.py @@ -40,7 +40,7 @@ class ImageItem(GraphicsObject): #self.pixmapItem = QtGui.QGraphicsPixmapItem(self) #self.qimage = QtGui.QImage() #self._pixmap = None - + self.menu = None self.image = None ## original image data self.qimage = None ## rendered image for display #self.clipMask = None diff --git a/graphicsItems/ROI.py b/graphicsItems/ROI.py index a4621187..10765b76 100644 --- a/graphicsItems/ROI.py +++ b/graphicsItems/ROI.py @@ -958,7 +958,7 @@ class ROI(GraphicsObject): ### Untranspose array before returning #return arr5.transpose(tr2) - def getAffineSliceParams(self, data, img, axes=(0.1)): + def getAffineSliceParams(self, data, img, axes=(0,1)): """ Returns the parameters needed to use :func:`affineSlice ` to extract a subset of *data* using this ROI and *img* to specify the subset. diff --git a/graphicsItems/ViewBox/ViewBox.py b/graphicsItems/ViewBox/ViewBox.py index 138573a0..590edb7e 100644 --- a/graphicsItems/ViewBox/ViewBox.py +++ b/graphicsItems/ViewBox/ViewBox.py @@ -470,7 +470,8 @@ class ViewBox(GraphicsWidget): def enableAutoRange(self, axis=None, enable=True): """ - Enable (or disable) auto-range for *axis*, which may be ViewBox.XAxis, ViewBox.YAxis, or ViewBox.XYAxes for both. + Enable (or disable) auto-range for *axis*, which may be ViewBox.XAxis, ViewBox.YAxis, or ViewBox.XYAxes for both + (if *axis* is omitted, both axes will be changed). When enabled, the axis will automatically rescale when items are added/removed or change their shape. The argument *enable* may optionally be a float (0.0-1.0) which indicates the fraction of the data that should be visible (this only works with items implementing a dataRange method, such as PlotDataItem).