Correctly read the 'style' argument while processing 'genfrac'.#23034
Correctly read the 'style' argument while processing 'genfrac'.#23034oscargus merged 7 commits intomatplotlib:mainfrom
Conversation
|
Thought I'd try one more thing before |
|
Sure, that works too. |
|
Some backend tests have failed—I don't suppose they are related to these changes? (I remember that they had passed after commit b7dee27.) |
|
Indeed, these are irrelevant. |
|
Yes, I could add a test for that. One point, though: If I set the rule size to 1 (e.g. |
I am open to suggestions! |
|
I agree this is a bit annoying :( Probably I would cheat a bit and, in the test, use and insert that value into the test genfrac. |
anntzer
left a comment
There was a problem hiding this comment.
Minor nits, which don't prevent the approval IMO.
|
Rebased on the current |
The test changes the DPI of the figure, but compares images after saving them, so rcParams['savefig.dpi'] is more appropriate.
|
Fixed merge conflicts and rebased again. There are a couple of back-and-forth changes, so I will combine everything into a single commit. The test failures are due to an unidentified image error. Not sure what went wrong. |
|
I squashed the commit. Thanks! |
…lotlib#23034) * Correctly read the 'style' argument while processing 'genfrac'. * Default to text style if style not specified. * Hard-coded enumerations. Support script_stype and script_script_style. * Automatically convert style number to enumerated type. * Used double quotes for strings. * Verify that genfrac's displaystyle == dfrac. * Use rcParams instead of rcParamsDefault in the test. The test changes the DPI of the figure, but compares images after saving them, so rcParams['savefig.dpi'] is more appropriate.
…lotlib#23034) * Correctly read the 'style' argument while processing 'genfrac'. * Default to text style if style not specified. * Hard-coded enumerations. Support script_stype and script_script_style. * Automatically convert style number to enumerated type. * Used double quotes for strings. * Verify that genfrac's displaystyle == dfrac. * Use rcParams instead of rcParamsDefault in the test. The test changes the DPI of the figure, but compares images after saving them, so rcParams['savefig.dpi'] is more appropriate.
PR Summary
An attempt to fix #23008.
PR Checklist
Tests and Styling
pytestpasses).flake8-docstringsand 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).