From 515ae5f6e3bf289e5e2656ff702006e191fdae5a Mon Sep 17 00:00:00 2001 From: Nils Nemitz Date: Sat, 17 Apr 2021 18:18:14 +0900 Subject: [PATCH] add axisOrder='col-major' --- pyqtgraph/graphicsItems/ColorBarItem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyqtgraph/graphicsItems/ColorBarItem.py b/pyqtgraph/graphicsItems/ColorBarItem.py index 7c4e9c2d..86b7e9c8 100644 --- a/pyqtgraph/graphicsItems/ColorBarItem.py +++ b/pyqtgraph/graphicsItems/ColorBarItem.py @@ -98,7 +98,7 @@ class ColorBarItem(PlotItem): self.axis.unlinkFromView() self.axis.setRange( self.values[0], self.values[1] ) - self.bar = ImageItem() + self.bar = ImageItem(axisOrder='col-major') if self.horizontal: self.bar.setImage( np.linspace(0, 1, 256).reshape( (-1,1) ) ) if label is not None: self.getAxis('bottom').setLabel(label)