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

Skip to content

Clarify tutorial "Customizing Matplotlib with style sheets and rcParams" #20812

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

Merged
merged 3 commits into from
Aug 18, 2021

Conversation

andthum
Copy link
Contributor

@andthum andthum commented Aug 9, 2021

PR Summary

Closes #20800

The tutorial Customizing Matplotlib with style sheets and rcParams was not clear about what rcParams can be set in style sheets. The blacklist of rcParams that cannot be set in style sheets is now documented in the docstring of matplotlib.style.use and the tutorial links to this blacklist.

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

Copy link

@github-actions github-actions bot left a 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.

Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this! I left some comments that would be good to address but are not deal-breakers.

Good to merge once the docs build cleanly!

@tacaswell tacaswell added this to the v3.5.0 milestone Aug 9, 2021
@andthum
Copy link
Contributor Author

andthum commented Aug 12, 2021

I hope I understood your concerns correctly and addressed them appropriately.

Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still approve!

Clarify that only the rcParam that is not related to style is ignored
instead of the entire style sheet.
  * Include `STYLE_BLACKLIST` in the documentation of
    `matplotlib.style.use` in alphabetical order.

  * Print list of rcParams in `matplotlib.RcParams` in alphabetical
    order.

  * Fix broken links to `.style.available` in
    `lib/matplotlib/style/core.py`.
@QuLogic QuLogic merged commit 0a4a10c into matplotlib:master Aug 18, 2021
@QuLogic
Copy link
Member

QuLogic commented Aug 18, 2021

Thanks @andthum! Congratulations on your first PR to Matplotlib 🎉 We hope to hear from you again.

@andthum
Copy link
Contributor Author

andthum commented Aug 18, 2021

Thank you @QuLogic, and thank you all for your great work on Matplotlib! It was a pleasure to contribute back a tiny piece.

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

Successfully merging this pull request may close these issues.

[Bug]: Setting backend in custom style sheet raises UserWarning
5 participants