[ENH]: int / float-tuple like kwarg legend(loc) for rcParams['legend.loc']#25839
[ENH]: int / float-tuple like kwarg legend(loc) for rcParams['legend.loc']#25839QuLogic merged 1 commit intomatplotlib:mainfrom
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! |
|
|
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
|
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