-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Doc: Replace matplotlibrc.template #25727
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
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 @snorfyang, it looks like the documentation build failed due to #25731. So I’ve just re-spun that. |
Now it passes. |
lib/matplotlib/font_manager.py
Outdated
@@ -878,7 +878,7 @@ def set_math_fontfamily(self, fontfamily): | |||
The name of the font family. | |||
|
|||
Available font families are defined in the | |||
matplotlibrc.template file | |||
lib/matplotlib/mpl-data/matplotlibrc file |
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.
This docstring now renders like this:
https://output.circle-artifacts.com/output/job/be496fb6-3b21-4e89-83df-1e83d5755dcd/artifacts/0/doc/build/html/api/font_manager_api.html#matplotlib.font_manager.FontProperties.set_math_fontfamily
I do not think including the GitHub path helps the user here, so I would remove that entirely. Also the use of “here” for the link text is quite outdated, so you could update that with a description of what is being linked.
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.
This docstring now renders like this: https://output.circle-artifacts.com/output/job/be496fb6-3b21-4e89-83df-1e83d5755dcd/artifacts/0/doc/build/html/api/font_manager_api.html#matplotlib.font_manager.FontProperties.set_math_fontfamily
I do not think including the GitHub path helps the user here, so I would remove that entirely. Also the use of “here” for the link text is quite outdated, so you could update that with a description of what is being linked.
Done.
lib/matplotlib/text.py
Outdated
@@ -1103,7 +1103,7 @@ def set_math_fontfamily(self, fontfamily): | |||
The name of the font family. | |||
|
|||
Available font families are defined in the | |||
:ref:`matplotlibrc.template file | |||
:ref:`lib/matplotlib/mpl-data/matplotlibrc file |
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.
Similar to the font_manager.py change, I think including the Github path here would just confuse the user.
https://output.circle-artifacts.com/output/job/be496fb6-3b21-4e89-83df-1e83d5755dcd/artifacts/0/doc/build/html/api/text_api.html#matplotlib.text.Text.set_math_fontfamily
lib/matplotlib/font_manager.py
Outdated
lib/matplotlib/mpl-data/matplotlibrc file | ||
:ref:`here <customizing-with-matplotlibrc-files>` | ||
See | ||
:ref:`available font families <customizing-with-matplotlibrc-files>`. |
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 think this description would now make the user expect the link to take them straight to a list of font families. In fact, they have to scroll down and search for it in the matplotlibrc comments. So I think the original was mostly right. Maybe something like “Available font families are defined in the default matplotlibrc file”?
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.
Looks good to me 👍
Thank you for your contribution @snorfyang and congratulations on your first PR in Matplotlib! We hope to hear from you again. |
@meeseeksdev backport to v3.7.x |
…727-on-v3.7.x Backport PR #25727 on branch v3.7.x (Doc: Replace matplotlibrc.template)
PR Summary
Close #25678