Skip to content
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

Get rcParams from mpl #23678

Merged
merged 1 commit into from Aug 19, 2022
Merged

Get rcParams from mpl #23678

merged 1 commit into from Aug 19, 2022

Conversation

oscargus
Copy link
Contributor

@oscargus oscargus commented Aug 19, 2022

PR Summary

Realized that this was quite inconsistent. It is still not really consistent, but I doubted half-ways that there is a preferred way...

Related to #23680 (almost closes it...)

So, is there are preferred way among

import matplotlib as mpl
...
mp.rcParams[...]

and

from matplotlib import rcParams
...
rcParams[...]

?

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • 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).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

@timhoffm
Copy link
Member

Use mpl.rcParams. I've written down the policy in #23680.

@oscargus
Copy link
Contributor Author

OK! Then there are a few more files to change.

@oscargus oscargus marked this pull request as draft August 19, 2022 15:21
@oscargus oscargus marked this pull request as ready for review August 19, 2022 16:06
@oscargus
Copy link
Contributor Author

I have changed "all" instances. In pyplot it is still imported. Some tests, use plt.rcParams, which seems to be on purpose and some should probably be changed to use rcContext.

But with respect to this PR I am happy for now.

@tacaswell tacaswell added this to the v3.6.0 milestone Aug 19, 2022
@tacaswell tacaswell merged commit ba7b86f into matplotlib:main Aug 19, 2022
@oscargus oscargus deleted the rcparamsimport branch August 19, 2022 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants