From c07b95812c5dbaa9fd78ad345b53090fbbd71013 Mon Sep 17 00:00:00 2001 From: Nils Nemitz Date: Sat, 26 Jun 2021 20:42:11 +0900 Subject: [PATCH] clear out ticks instead of hiding them --- pyqtgraph/graphicsItems/ColorBarItem.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyqtgraph/graphicsItems/ColorBarItem.py b/pyqtgraph/graphicsItems/ColorBarItem.py index 86b7e9c8..f4fe0591 100644 --- a/pyqtgraph/graphicsItems/ColorBarItem.py +++ b/pyqtgraph/graphicsItems/ColorBarItem.py @@ -85,7 +85,7 @@ class ColorBarItem(PlotItem): for key in ['left','right','top','bottom']: self.showAxis(key) axis = self.getAxis(key) - axis.setZValue(1) + axis.setZValue(0.5) # select main axis: if self.horizontal and key == 'bottom': self.axis = axis @@ -93,7 +93,8 @@ class ColorBarItem(PlotItem): self.axis = axis self.axis.setWidth(45) else: # show other axes to create frame - axis.setStyle( showValues=False, tickLength=0 ) + axis.setTicks( [] ) + axis.setStyle( showValues=False ) self.axis.setStyle( showValues=True ) self.axis.unlinkFromView() self.axis.setRange( self.values[0], self.values[1] )