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

Skip to content

Commit 77ff55b

Browse files
author
Steve Chaplin
committed
SC 10/12/2004
svn path=/trunk/matplotlib/; revision=749
1 parent 3806642 commit 77ff55b

2 files changed

Lines changed: 5 additions & 9 deletions

File tree

lib/matplotlib/backends/backend_gdk.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,8 @@ def _renderer_init(self):
485485

486486
def _render_to_pixmap(self, width, height):
487487
"""Render the figure to a gdk.Pixmap, is used for
488-
- rendering the pixmap to display (matlab.draw)
489-
- rendering the pixmap to save to a file (matlab.savefig)
488+
- rendering the pixmap to display (pylab.draw)
489+
- rendering the pixmap to save to a file (pylab.savefig)
490490
Should not be overridden
491491
"""
492492
if DEBUG: print 'FigureCanvasGDK.%s' % fn_name()

lib/matplotlib/backends/backend_svg.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@
1313
from matplotlib._pylab_helpers import Gcf
1414
from matplotlib import rcParams
1515

16-
try: from matplotlib.mathtext import math_parse_s_ft2font_svg
17-
except ImportError:
18-
print >>sys.stderr, 'backend_svg could not import mathtext (build with ft2font)'
19-
useMathText = False
20-
else: useMathText = True
16+
from matplotlib.mathtext import math_parse_s_ft2font_svg
2117

2218
import sys,os,math
2319

@@ -106,7 +102,7 @@ def get_text_width_height(self, s, prop, ismath):
106102
get the width and height in display coords of the string s
107103
with FontPropertry prop
108104
"""
109-
if ismath and useMathText:
105+
if ismath:
110106
width, height, glyphs = math_parse_s_ft2font_svg(
111107
s, 72, prop.get_size_in_points())
112108
return width, height
@@ -207,7 +203,7 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath):
207203
"""
208204
draw text
209205
"""
210-
if ismath and useMathText:
206+
if ismath:
211207
return self.draw_mathtext(gc, x, y, s, prop, angle)
212208

213209
font = self._get_font(prop)

0 commit comments

Comments
 (0)