Skip to content

Commit

Permalink
Update lib/matplotlib/backends/backend_cairo.py
Browse files Browse the repository at this point in the history
  • Loading branch information
burrbull committed Jan 20, 2013
1 parent 034b12b commit cb419a9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/matplotlib/backends/backend_cairo.py
Expand Up @@ -220,7 +220,10 @@ def _draw_mathtext(self, gc, x, y, s, prop, angle):

size = fontsize * self.dpi / 72.0
ctx.set_font_size(size)
ctx.show_text(s.encode("utf-8"))
if sys.version_info[0] < 3:
ctx.show_text (s.encode("utf-8"))
else:
ctx.show_text (s)
ctx.restore()

for ox, oy, w, h in rects:
Expand Down

0 comments on commit cb419a9

Please sign in to comment.