File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -194,14 +194,15 @@ def autofmt_xdate(
194
194
Selects which ticklabels to rotate.
195
195
"""
196
196
_api .check_in_list (['major' , 'minor' , 'both' ], which = which )
197
- allsubplots = all (ax .get_subplotspec () for ax in self .axes )
198
- if len (self .axes ) == 1 :
197
+ axes = [ax for ax in self .axes if ax ._label != '<colorbar>' ]
198
+ allsubplots = all (ax .get_subplotspec () for ax in axes )
199
+ if len (axes ) == 1 :
199
200
for label in self .axes [0 ].get_xticklabels (which = which ):
200
201
label .set_ha (ha )
201
202
label .set_rotation (rotation )
202
203
else :
203
204
if allsubplots :
204
- for ax in self . get_axes () :
205
+ for ax in axes :
205
206
if ax .get_subplotspec ().is_last_row ():
206
207
for label in ax .get_xticklabels (which = which ):
207
208
label .set_ha (ha )
@@ -211,7 +212,8 @@ def autofmt_xdate(
211
212
label .set_visible (False )
212
213
ax .set_xlabel ('' )
213
214
214
- if allsubplots :
215
+ engine = self .get_layout_engine ()
216
+ if allsubplots and (engine is None or engine .adjust_compatible ):
215
217
self .subplots_adjust (bottom = bottom )
216
218
self .stale = True
217
219
You can’t perform that action at this time.
0 commit comments