Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix suplabel autopos #20761

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
merged 2 commits into from
Jul 29, 2021
Merged

Fix suplabel autopos #20761

merged 2 commits into from
Jul 29, 2021

Conversation

jklymak
Copy link
Member

@jklymak jklymak commented Jul 28, 2021

PR Summary

Closes #20760

If you specify the x-position of an supxlabel (or y position of supylabel) it should not disqualify the label from constrained_layout...

import matplotlib.pyplot as plt

fig, ax = plt.subplots(constrained_layout=True)
lab = fig.supxlabel('Boo', x=0.7)
plt.show()

Before:

Before

After

After

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

@jklymak jklymak added the topic: geometry manager LayoutEngine, Constrained layout, Tight layout label Jul 28, 2021
@jklymak jklymak modified the milestones: v3.5.0, v3.4.3 Jul 28, 2021
@jklymak
Copy link
Member Author

jklymak commented Jul 28, 2021

Not urgent for 3.4.3, but if it sneaks in, all the better.

@jklymak jklymak force-pushed the fix-suplabel-autopos branch from 702a0a9 to e022c04 Compare July 29, 2021 05:03
@QuLogic QuLogic merged commit 1685bcb into matplotlib:master Jul 29, 2021
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Jul 29, 2021
QuLogic added a commit to meeseeksmachine/matplotlib that referenced this pull request Jul 29, 2021
QuLogic added a commit that referenced this pull request Jul 29, 2021
…761-on-v3.4.x

Backport PR #20761 on branch v3.4.x (Fix suplabel autopos)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: geometry manager LayoutEngine, Constrained layout, Tight layout
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: subfigure position shifts on y-axis when x kwarg added to supxlabel
3 participants