-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Add legend title font properties #19304
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
Add legend title font properties #19304
Conversation
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 opening your first PR into Matplotlib!
If you have not heard from us in a while, please feel free to ping @matplotlib/developers or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join us on gitter for real-time discussion.
For details on testing, writing docs, and our review process, please see the developer guide
We strive to be a welcoming and open project. Please follow our Code of Conduct.
|
Thanks a lot, this seems good (without looking at it too hard). It would be nice if the new functionality were in our automated tests, it probably needs a "what's new" and maybe an example in the docs? Perhaps just extend an example that already sets the fontsize? |
|
I don't know how to address the failures of docs building. Could anyone help, please? |
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.
Docs fail with following warnings:
/home/circleci/project/doc/users/next_whats_new/legend_title_prop_kwarg.rst:7: WARNING: Unexpected indentation.
/home/circleci/project/doc/users/next_whats_new/legend_title_prop_kwarg.rst:8: WARNING: Block quote ends without a blank line; unexpected unindent.
Many thanks. I have accepted the suggested changes. |
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 for sticking with it. Looks good to me, but we need a second review.
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.
I suppose it might make sense to deprecate title_fontsize at this point? @timhoffm
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.
I do not think we should add self.title_prop as new public API on the Legend.
Sorry, something went wrong.
All reactions
8000
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.
@smartlixx You've requested a review, however there are still unanswered comments from the previous review. Please address all questions before requesting a review.
Sorry, something went wrong.
All reactions
Thanks. I was waiting for your confirmation whether we should deprecate |
All reactions
Sorry, something went wrong.
9577434 to
3bcc6db
Compare
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.
Modulo one doc clarification.
Sorry, something went wrong.
All reactions
3bcc6db to
2aeed55
Compare
|
@tacaswell can you please have a look? I still see the 'changes requested' label after I made those changes. PS: Should I squash the commits to reduce the commit history? |
All reactions
Sorry, something went wrong.
|
You will need to rebase to fix the doc build. |
All reactions
Sorry, something went wrong.
e55d23b to
5be2c74
Compare
|
After rebase, the doc build still fails, at different places. And the Azure jobs failure is not related to this PR. |
All reactions
Sorry, something went wrong.
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.
Should fix the docs.
Sorry, something went wrong.
All reactions
775b01b to
e7f9fb7
Compare
…d by jklymak Remove title_prop from public API and update test for robustness Change title_prop to title_fontproperties
e7f9fb7 to
3e87c46
Compare
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.
Some small things could be shortened.
Sorry, something went wrong.
All reactions
3e87c46 to
f5d44e0
Compare
Reviewers
QuLogic
jklymak
timhoffm
github-actions[bot]
aitikgupta
tacaswell
Assignees
No one assignedLabels
Projects
Milestone
v3.5.0Development
Successfully merging this pull request may close these issues.
PR Summary
Add a keyword
title_fontpropertiestomatplotlib.pyplot.legend, so that we can prescribe font properties for legend's title. It can't be used together with thetitle_fontsize. This closes issue #19259.PR Checklist
pytestpasses).flake8on changed files to check).flake8-docstringsand runflake8 --docstring-convention=all).doc/users/next_whats_new/(follow instructions in README.rst there).doc/api/next_api_changes/(follow instructions in README.rst there).Now we can use the following codes to specify legend title font properties, and
title_fontsizewill override thesizeintitle_prop.The output is