Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 93e00df

Browse files
committed
Revert "use bottom-alignment instead of baseline when rotation is not 0"
This reverts commit ed7db9b.
1 parent 7b4f5ea commit 93e00df

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lib/matplotlib/text.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -384,12 +384,7 @@ def get_text_width_height_descent(*kl, **kwargs):
384384

385385
if valign=='center': offsety = (ymin + height/2.0)
386386
elif valign=='top': offsety = (ymin + height)
387-
elif valign=='baseline':
388-
if self.get_rotation() == 0:
389-
offsety = (ymin + height) - baseline
390-
else:
391-
# if rotation is not 0, use va=bottom for baseline
392-
offsety = ymin
387+
elif valign=='baseline': offsety = (ymin + height) - baseline
393388
else: offsety = ymin
394389
else:
395390
xmin1, ymin1 = cornersHoriz[0]

0 commit comments

Comments
 (0)