-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add text.parse_math rcParams #22556
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 text.parse_math rcParams #22556
Conversation
3cd6f18
to
d3d7acb
Compare
d3d7acb
to
d5e6ed5
Compare
b7dbd28
to
6deed94
Compare
Just to confirm, in general the preferred approach is as. In
In
? I noted that this didn't really hold in all files. Main benefit, I guess, is that the default value is handled consistently both in documentation and in the code (so that it is "always" possible to call with None to reset to default) and so that the redundant calls to rcParam are reduced. |
6deed94
to
efe77be
Compare
Modified the test to use rc_context (which I assume is the better way?). |
Each test gets fresh rcParams to ensure they are isolated. So it doesn't really matter here.
We do not have a policy on this. This approach makes the setters to accept |
In a good or a bad way? 😄 Just noted that this was heavily used in the rest of this file (at least). (Saw on SE (although I cannot find it now) that the |
efe77be
to
b960ac4
Compare
b960ac4
to
2023a54
Compare
Finally got around to updating this. Now with a minimal impact on the code, simply checking on creation. |
I think we should have another reviewer because the PR changed significantly after @tacaswell's approval. |
PR Summary
Based on the discussion in #22537, there was a question about controlling
parse_math
through rcParams. Assuming that one often would like to use some special packages, it probably would be quite convenient to do that.Should this be documented as a new feature?
(It is not obvious to me how the default value is controlled...)
PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).