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

Skip to content

Commit 3f369e0

Browse files
committed
[ 1985420 ] Repair of baseline alignment in Text._get_layout
svn path=/trunk/matplotlib/; revision=5460
1 parent 8a05fa0 commit 3f369e0

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

CHANGELOG

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
2008-06-10 Fix text baseline alignment bug. [ 1985420 ] Repair of
2+
baseline alignment in Text._get_layout. Thanks Stan West -
3+
MGD
4+
15
2008-06-09 Committed Gregor's image resample patch to downsampling
26
images with new rcparam image.resample - JDH
37

4-
2008-06-09 Don't install Enthought.Traits along with matplotlib. For
5-
matplotlib developers convenience, it can still be
8+
2008-06-09 Don't install Enthought.Traits along with matplotlib. For
9+
matplotlib developers convenience, it can still be
610
installed by setting an option in setup.cfg while we figure
711
decide if there is a future for the traited config - DSD
812

lib/matplotlib/text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def _get_layout(self, renderer):
246246

247247
if valign=='center': offsety = (ymin + height/2.0)
248248
elif valign=='top': offsety = (ymin + height)
249-
elif valign=='baseline': offsety = (ymin + height) + baseline
249+
elif valign=='baseline': offsety = (ymin + height) - baseline
250250
else: offsety = ymin
251251

252252
xmin -= offsetx

0 commit comments

Comments
 (0)