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

Skip to content

Commit b74c08b

Browse files
committed
Fix buglet in get_text_width_height_descent of backend_agg
when text.usetex is in effect. The descent returned is probably not correct, but it should be similar to the one returned by backend_ps. svn path=/trunk/matplotlib/; revision=3768
1 parent 16c22dc commit b74c08b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/matplotlib/backends/backend_agg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ def get_text_width_height_descent(self, s, prop, ismath, rgb=(0,0,0)):
228228
texmanager = self.get_texmanager()
229229
Z = texmanager.get_rgba(s, size, self.dpi.get(), rgb)
230230
m,n,tmp = Z.shape
231-
return n,m
231+
# TODO: descent of TeX text (I am imitating backend_ps here -JKS)
232+
return n, m, m
232233

233234
if ismath:
234235
ox, oy, width, height, descent, fonts, used_characters = \

0 commit comments

Comments
 (0)