-
-
Notifications
You must be signed in to change notification settings - Fork 8k
FIX: Reset label of axis to center #21773
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 was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
All the tests here need to pass |
OK so this wasn't a bug before because centre was never called, but with the new version you had to make sure not to ignore ha etc? I guess that means this needs a minor API change note that "left" and "right" will now respect "ha" ie.. fixes a bug where ha was ignored if loc="left" or "right" Are you sure that this catches ha and horizontal alignment properly? Thanks for persisting with this! |
Yep, you're right. The if/else blocks were never getting activated if Only one small confusion that I can foresee - if both |
I'm not sure - I thnk we want to raise these days on conflicting input, but we certainly do not do so consistently. @timhoffm ? |
Under normal circumstances we raise via |
Done. The error will now be thrown downstream via |
I actually meant calling |
@timhoffm Makes sense, much more readable now |
I think we need one more review since there have been substantial changes singe @dstansby's approval. |
What should the semantics be if you pass For the latter case, this can be greatly simplified, as there is already a check if |
I guess depends on why they were kept separate originally. Was |
X and ha should be independent. Strings for loc are short for given x/ha pairs and specifying ha with loc should override the loc value of ha. Specifying loc and x should error. |
Specifying I think that means we should only apply these defaults if only Additionally, the |
@QuLogic I assume initialising |
Yes, I think |
I'm going to squash merge this, because we don't really need the back-and-forth to get tests working. |
…773-on-v3.5.x Backport PR #21773 on branch v3.5.x (FIX: Reset label of axis to center)
PR Summary
Fixes #21772
xlabel
andylabel
test_axes.py
set_ylabel
, thehorizontalalignment
was getting reset instead ofverticalalignment
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).