@@ -548,7 +548,7 @@ def _config_axis(self):
548
548
ticks_position = self .ticklocation )
549
549
short_axis .set_ticks ([])
550
550
short_axis .set_ticks ([], minor = True )
551
- self ._set_label ()
551
+ self .stale = True
552
552
553
553
def _get_ticker_locator_formatter (self ):
554
554
"""
@@ -726,16 +726,8 @@ def minorticks_off(self):
726
726
"""Turn the minor ticks of the colorbar off."""
727
727
ax = self .ax
728
728
long_axis = ax .yaxis if self .orientation == 'vertical' else ax .xaxis
729
-
730
729
long_axis .set_minor_locator (ticker .NullLocator ())
731
730
732
- def _set_label (self ):
733
- if self .orientation == 'vertical' :
734
- self .ax .set_ylabel (self ._label , ** self ._labelkw )
735
- else :
736
- self .ax .set_xlabel (self ._label , ** self ._labelkw )
737
- self .stale = True
738
-
739
731
def set_label (self , label , * , loc = None , ** kwargs ):
740
732
"""
741
733
Add a label to the long axis of the colorbar.
@@ -778,9 +770,11 @@ def set_label(self, label, *, loc=None, **kwargs):
778
770
elif loc in ['left' , 'bottom' ]:
779
771
kwargs [_pos_xy ] = 0.
780
772
kwargs ['horizontalalignment' ] = 'left'
781
- self ._label = label
782
- self ._labelkw = kwargs
783
- self ._set_label ()
773
+ if self .orientation == 'vertical' :
774
+ self .ax .set_ylabel (label , ** kwargs )
775
+ else :
776
+ self .ax .set_xlabel (label , ** kwargs )
777
+ self .stale = True
784
778
785
779
def _outline (self , X , Y ):
786
780
"""
0 commit comments