Fix vertical alignment of text#13029
Merged
timhoffm merged 2 commits intomatplotlib:masterfrom Dec 23, 2018
stefraynaud:bug_rotation_mode_center_baseline
Merged
Fix vertical alignment of text#13029timhoffm merged 2 commits intomatplotlib:masterfrom stefraynaud:bug_rotation_mode_center_baseline
timhoffm merged 2 commits intomatplotlib:masterfrom
stefraynaud:bug_rotation_mode_center_baseline
Conversation
This solves #13028.
Member
|
This should get a test I think. Was |
... when rotation=0
Contributor
Author
|
@jklymak You are right. I added a test that makes sure settting rotation_mode doesn't change anything if rotation=0. |
Member
|
Do you know if |
QuLogic
approved these changes
Dec 23, 2018
Member
|
The rotation center is not at (0.5, 0.5) but at the edge of the "p". However, I'm unsure if that's supposed to happen, also it's the same before and after this PR. So if that's an issue it's a separate one. |
timhoffm
approved these changes
Dec 23, 2018
Member
|
Thanks, and congratulations on your first contribution to Matplotlib! Hoping to see you back some time. |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


PR Summary
This solves #13028: when
rotation_mode='anchor'and"verticalaligment="center_baseline", the vertical alignment is wrong even ifrotation=0. The vertical position of text was badly computed in this configuration, and the PR solves the problem.PR Checklist