@@ -548,7 +548,7 @@ def _config_axis(self):
548548 ticks_position = self .ticklocation )
549549 short_axis .set_ticks ([])
550550 short_axis .set_ticks ([], minor = True )
551- self ._set_label ()
551+ self .stale = True
552552
553553 def _get_ticker_locator_formatter (self ):
554554 """
@@ -726,16 +726,8 @@ def minorticks_off(self):
726726 """Turn the minor ticks of the colorbar off."""
727727 ax = self .ax
728728 long_axis = ax .yaxis if self .orientation == 'vertical' else ax .xaxis
729-
730729 long_axis .set_minor_locator (ticker .NullLocator ())
731730
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-
739731 def set_label (self , label , * , loc = None , ** kwargs ):
740732 """
741733 Add a label to the long axis of the colorbar.
@@ -778,9 +770,11 @@ def set_label(self, label, *, loc=None, **kwargs):
778770 elif loc in ['left' , 'bottom' ]:
779771 kwargs [_pos_xy ] = 0.
780772 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
784778
785779 def _outline (self , X , Y ):
786780 """
0 commit comments