@@ -927,12 +927,16 @@ def _add_axes_panel(self, ax, side=None, **kwargs):
927927 side = _translate_loc (side , 'panel' , default = _not_none (orig , 'right' ))
928928
929929 # Add and setup the panel accounting for index changes
930- # NOTE: Always put tick labels on the 'outside'
930+ # NOTE: Always put tick labels on the 'outside' and permit arbitrary
931+ # keyword arguments passed from the user.
931932 gs = self .gridspec
932933 if not gs :
933934 raise RuntimeError ('The gridspec must be active.' )
934- ss , share = gs ._insert_panel_slot (side , ax , ** kwargs )
935- pax = self .add_subplot (ss , autoshare = False , number = False )
935+ kw = _pop_params (kwargs , gs ._insert_panel_slot )
936+ ss , share = gs ._insert_panel_slot (side , ax , ** kw )
937+ kwargs ['autoshare' ] = False
938+ kwargs .setdefault ('number' , False ) # power users might number panels
939+ pax = self .add_subplot (ss , ** kwargs )
936940 pax ._panel_side = side
937941 pax ._panel_share = share
938942 pax ._panel_parent = ax
@@ -963,7 +967,8 @@ def _add_figure_panel(
963967 span = _not_none (span = span , col = col , cols = cols )
964968
965969 # Add and setup panel
966- # NOTE: This relies on panel slot obfuscation built into gridspec
970+ # NOTE: This is only called internally by colorbar and legend so
971+ # do not need to pass aribtrary axes keyword arguments.
967972 gs = self .gridspec
968973 if not gs :
969974 raise RuntimeError ('The gridspec must be active.' )
0 commit comments