Skip to content

Commit 1408738

Browse files
authored
COMPAT: MPL 3.4.0 (#42803)
1 parent a4c5d78 commit 1408738

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pandas/plotting/_matplotlib/tools.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,12 @@ def handle_shared_axes(
417417
except IndexError:
418418
# if gridspec is used, ax.rowNum and ax.colNum may different
419419
# from layout shape. in this case, use last_row logic
420+
if compat.mpl_ge_3_4_0():
421+
is_last_row = lambda x: x.get_subplotspec().is_last_row()
422+
else:
423+
is_last_row = lambda x: x.is_last_row()
420424
for ax in axarr:
421-
if ax.is_last_row():
425+
if is_last_row(ax):
422426
continue
423427
if sharex or _has_externally_shared_axis(ax, "x"):
424428
_remove_labels_from_axis(ax.xaxis)

0 commit comments

Comments
 (0)