We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45cdee2 commit 7293734Copy full SHA for 7293734
lib/matplotlib/text.py
@@ -438,7 +438,7 @@ def _get_layout(self, renderer):
438
elif valign == 'baseline':
439
offsety = (ymin + height) - baseline
440
elif valign == 'center_baseline':
441
- offsety = (ymin + (height + (height - baseline)) / 2.0)
+ offsety = ymin + height - baseline / 2.0
442
else:
443
offsety = ymin
444
@@ -459,7 +459,7 @@ def _get_layout(self, renderer):
459
460
offsety = ymax1 - baseline
461
462
- offsety = (ymin1 + ymax1) / 2.0
+ offsety = (ymin1 + ymax1 - baseline) / 2.0
463
464
offsety = ymin1
465
0 commit comments