@@ -50,15 +50,14 @@ def _colorbar_extension_shape(spacing):
5050 boundaries = values = norm .boundaries
5151 # Create a subplot.
5252 cax = fig .add_subplot (4 , 1 , i + 1 )
53- # Turn off text and ticks.
54- for item in cax .get_xticklabels () + cax .get_yticklabels () + \
55- cax .get_xticklines () + cax .get_yticklines ():
56- item .set_visible (False )
5753 # Generate the colorbar.
5854 cb = ColorbarBase (cax , cmap = cmap , norm = norm ,
5955 boundaries = boundaries , values = values ,
6056 extend = extension_type , extendrect = True ,
6157 orientation = 'horizontal' , spacing = spacing )
58+ # Turn off text and ticks.
59+ cax .tick_params (left = False , labelleft = False ,
60+ bottom = False , labelbottom = False )
6261 # Return the figure to the caller.
6362 return fig
6463
@@ -82,15 +81,14 @@ def _colorbar_extension_length(spacing):
8281 for j , extendfrac in enumerate ((None , 'auto' , 0.1 )):
8382 # Create a subplot.
8483 cax = fig .add_subplot (12 , 1 , i * 3 + j + 1 )
85- # Turn off text and ticks.
86- for item in cax .get_xticklabels () + cax .get_yticklabels () + \
87- cax .get_xticklines () + cax .get_yticklines ():
88- item .set_visible (False )
8984 # Generate the colorbar.
9085 ColorbarBase (cax , cmap = cmap , norm = norm ,
9186 boundaries = boundaries , values = values ,
9287 extend = extension_type , extendfrac = extendfrac ,
9388 orientation = 'horizontal' , spacing = spacing )
89+ # Turn off text and ticks.
90+ cax .tick_params (left = False , labelleft = False ,
91+ bottom = False , labelbottom = False )
9492 # Return the figure to the caller.
9593 return fig
9694
0 commit comments