-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[ENH]: int / float-tuple like kwarg legend(loc) for rcParams['legend.loc'] #25839
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
Conversation
5f21ef5
to
21a74f4
Compare
Thank you for your first PR 🎉 Looking forward to more such contributions! :) |
Thank you so much! |
@chahak13 Do I need to note for the API change / add documentation? |
There should be a note in the what's new section I believe, yes. |
Ok, I'll take care of it tomorrow then. |
Thank you for your work on this @NoyHanan , I think it is headed the right direction! However I left a couple of comments that need to be addressed. |
Hi @tacaswell and @ksunden , |
There should also be a test of reading an the values from a file. |
On it. |
Hi @tacaswell! |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your work on this @NoyHanan, and apologies for the delay in reviewing. Could you update the title of this PR to something more descriptive?
Hi @rcomer, |
doc/users/next_whats_new/rcParams[legend.loc]_supports_float_tuple.rst
Outdated
Show resolved
Hide resolved
doc/users/next_whats_new/rcParams[legend.loc]_supports_float_tuple.rst
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @NoyHanan, your updates look good to me.
For code changes, we require approvals from two core developers. So yes, please address @QuLogic's comments. Then once he is happy he will likely approve and merge. |
9bb4013
to
df2ac49
Compare
It looks like you'll also need to update the typing stubs now that the validator is private. Also, you may want to squash the changes together. |
Sure, no problem. |
Just undo the change to the |
df2ac49
to
3e45dd2
Compare
Thanks! |
To squash, you can do an interactive rebase. I strongly recommend saving a backup copy of your branch first if you have not done this (much) before. |
HI @QuLogic, I'll appriciate your review on the changes I made 🙏 |
@NoyHanan are you happy to squash the commits, or would you prefer us to take care of that? |
I think minimal numbers of commits are generally preferred. |
3e45dd2
to
063c22e
Compare
Thank you for guiding me. I hope that its fine now. |
Hi @QuLogic, could you please review the changes I made? 🙏 |
Congratulations on your first PR merged into Matplotlib @NoyHanan! We hope to hear from you again. |
Thank you so much, I appreciate your support. You'll definitely hear from me again :) |
closes #22338
PR summary
I Added the ability to use int / float-tuple like kwarg legend(loc) for rcParams['legend.loc'], by creating a new validator for rcParams['legend.loc'].
This new change will help to a consistent and a uniform approach to using the legend.
Addresses both parts of the issue
PR checklist