Skip to content

Backport PR #29254 on branch v3.10.x (DOC: Add note to align_labels()) #29290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
17 changes: 11 additions & 6 deletions lib/matplotlib/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1382,8 +1382,8 @@ def align_xlabels(self, axs=None):

Notes
-----
This assumes that ``axs`` are from the same `.GridSpec`, so that
their `.SubplotSpec` positions correspond to figure positions.
This assumes that all Axes in ``axs`` are from the same `.GridSpec`,
so that their `.SubplotSpec` positions correspond to figure positions.

Examples
--------
Expand Down Expand Up @@ -1444,8 +1444,8 @@ def align_ylabels(self, axs=None):

Notes
-----
This assumes that ``axs`` are from the same `.GridSpec`, so that
their `.SubplotSpec` positions correspond to figure positions.
This assumes that all Axes in ``axs`` are from the same `.GridSpec`,
so that their `.SubplotSpec` positions correspond to figure positions.

Examples
--------
Expand Down Expand Up @@ -1500,8 +1500,8 @@ def align_titles(self, axs=None):

Notes
-----
This assumes that ``axs`` are from the same `.GridSpec`, so that
their `.SubplotSpec` positions correspond to figure positions.
This assumes that all Axes in ``axs`` are from the same `.GridSpec`,
so that their `.SubplotSpec` positions correspond to figure positions.

Examples
--------
Expand Down Expand Up @@ -1544,6 +1544,11 @@ def align_labels(self, axs=None):
matplotlib.figure.Figure.align_xlabels
matplotlib.figure.Figure.align_ylabels
matplotlib.figure.Figure.align_titles

Notes
-----
This assumes that all Axes in ``axs`` are from the same `.GridSpec`,
so that their `.SubplotSpec` positions correspond to figure positions.
"""
self.align_xlabels(axs=axs)
self.align_ylabels(axs=axs)
Expand Down
Loading