-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Update xtick.alignment parameter in rcsetup to validate against correct values #16727
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 should be tests for this; please do not add commented out code. Also, please rebase instead of merging if possible. |
@QuLogic Please reconsider the question of tests. This is fundamentally a simple one-line fix to a bug in resetup.py which probably goes way back, and was propagated rather than fixed in the cleanup b32a06a. It is just putting in the right set of strings. For something this simple, I think that adding tests is just adding code to be maintained, not making anything safer. This appears to be fixing such a simple and obvious bug that we should be sure to get it into 3.3, if at all possible. |
There already are tests in this PR; they're just commented out. They either need to work, or not be added at all. |
Exactly, and I'm suggesting that they should not be added at all. All we need is the first commit in the series. |
Apologies for not responding here, was caught up in some other commitments. I will remove the test cases and rebase within the two days. |
fbda77d
to
7a5e609
Compare
Perhaps I was unclear; I did not mean that there should be tests, but that there should be or should not be tests, not some code in limbo. |
Thanks @MuhammadFarooq1234! |
I think this is your first PR for us, correct? Congratulations, and thank you! |
PR Summary
The issue is related to 16584. Users were not able to set xtick.alignment parameter from rcsetup.py in their matplotlibrc files due to validation values not being set correctly. Validation values are now set to ['center', 'right', 'left'] and no errors are thrown when xtick.alignment is set to any of these valid values. Value erro is thrown when set otherwise as expected.
I had added test cases for this issue but commented them out because it seems the warnings they had generated were causing failures:
FixedFormatter should only be used together with FixedLocator
Was not sure if these test cases were necessary for this change so I have them commented out for now but will fix them if required.
PR Checklist