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

Skip to content

Take text objects into account in legend autopositioning. #7869

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

Closed
anntzer opened this issue Jan 19, 2017 · 7 comments
Closed

Take text objects into account in legend autopositioning. #7869

anntzer opened this issue Jan 19, 2017 · 7 comments
Milestone

Comments

@anntzer
Copy link
Contributor

anntzer commented Jan 19, 2017

Legend autopositioning currently does not take text objects into account as can be checked by running

plt.plot([0, 1], label="foo"); plt.text(.05, .95, "a"); plt.legend()

This is because text objects are not included in _auto_legend_data (which only serves that purpose, AFAICT).

Adding them should be easy, but extra points if the autoplacement algorithm penalizes overlapping with text more than overlapping with other artists (given that it's probably indeed worse in general).

@RiazCharania
Copy link

Is anyone else currently working on this? If not I'll give it a try.

@timhoffm
Copy link
Member

timhoffm commented Mar 4, 2020

Go for it.

@github-actions
Copy link

github-actions bot commented Apr 6, 2023

This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

@github-actions github-actions bot added the status: inactive Marked by the “Stale” Github Action label Apr 6, 2023
@anntzer
Copy link
Contributor Author

anntzer commented Apr 6, 2023

I still think this would be nice.

@github-actions github-actions bot removed the status: inactive Marked by the “Stale” Github Action label Apr 7, 2023
Copy link

This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

@github-actions github-actions bot added the status: inactive Marked by the “Stale” Github Action label Apr 12, 2024
@anntzer anntzer added keep Items to be ignored by the “Stale” Github Action and removed status: inactive Marked by the “Stale” Github Action labels Apr 12, 2024
@saranti
Copy link
Contributor

saranti commented Jun 15, 2024

I think this was fixed by 87d05ae

@anntzer
Copy link
Contributor Author

anntzer commented Jun 15, 2024

Indeed.

@anntzer anntzer closed this as completed Jun 15, 2024
@anntzer anntzer added this to the v3.9.0 milestone Jun 15, 2024
@QuLogic QuLogic removed the keep Items to be ignored by the “Stale” Github Action label Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants