Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pandas/plotting/_matplotlib/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,12 @@ def handle_shared_axes(
except IndexError:
# if gridspec is used, ax.rowNum and ax.colNum may different
# from layout shape. in this case, use last_row logic
if compat.mpl_ge_3_4_0():
is_last_row = lambda x: x.get_subplotspec().is_last_row()
else:
is_last_row = lambda x: x.is_last_row()
for ax in axarr:
if ax.is_last_row():
if is_last_row(ax):
continue
if sharex or _has_externally_shared_axis(ax, "x"):
_remove_labels_from_axis(ax.xaxis)
Expand Down