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

Skip to content

[BUG in 3.5.0rc1] - Anatomy of a Figure has the legend in the wrong spot #21592

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 1 commit into from
Nov 11, 2021

Conversation

stefmolin
Copy link
Contributor

PR Summary

In 3.5.0rc1, the call to ax.legend() in the Anatomy of a figure example is now placing the legend in the lower right corner:
image

In version 3.4.3, this call is determining that the "upper right" is the best location for the legend so the example works. I modified the call to ax.legend() to specify loc="upper right" to ensure we always have the legend in the correct spot.

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).
  • [X]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).

@QuLogic QuLogic added this to the v3.5.0 milestone Nov 10, 2021
@tacaswell
Copy link
Member

Odd, circle missed this PR somehow (which is the one we actually need to run!)

@tacaswell
Copy link
Member

Thank you for catching this @stefmolin !

@QuLogic QuLogic closed this Nov 11, 2021
@QuLogic QuLogic reopened this Nov 11, 2021
@timhoffm timhoffm merged commit b528d5c into matplotlib:main Nov 11, 2021
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Nov 11, 2021
@stefmolin
Copy link
Contributor Author

My pleasure! This is a great resource for newcomers (I'm using it in a workshop I'm developing), so I'm glad I caught it 🙂

tacaswell added a commit that referenced this pull request Nov 11, 2021
…592-on-v3.5.x

Backport PR #21592 on branch v3.5.x ([BUG in 3.5.0rc1] - Anatomy of a Figure has the legend in the wrong spot)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants