8000 Fix vertical alignment of text · matplotlib/matplotlib@ba4e8db · GitHub
[go: up one dir, main page]

Skip to content

Commit ba4e8db

Browse files
committed
Fix vertical alignment of text
This solves #13028.
1 parent 22649b6 commit ba4e8db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ def _get_layout(self, renderer):
403403
elif valign == 'baseline':
404404
offsety = ymax1 - baseline
405405
elif valign == 'center_baseline':
406-
offsety = (ymin1 + ymax1 - baseline) / 2.0
406+
offsety = ymax1 - baseline / 2.0
407407
else:
408408
offsety = ymin1
409409

0 commit comments

Comments
 (0)
0