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

Skip to content

Commit 8026851

Browse files
committed
Merge branch 'patch-1' of git://github.com/burrbull/matplotlib into burrbull-patch-1
2 parents 05541c4 + cb419a9 commit 8026851

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/backends/backend_cairo.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,10 @@ def _draw_mathtext(self, gc, x, y, s, prop, angle):
220220

221221
size = fontsize * self.dpi / 72.0
222222
ctx.set_font_size(size)
223-
ctx.show_text(s.encode("utf-8"))
223+
if sys.version_info[0] < 3:
224+
ctx.show_text (s.encode("utf-8"))
225+
else:
226+
ctx.show_text (s)
224227
ctx.restore()
225228

226229
for ox, oy, w, h in rects:

0 commit comments

Comments
 (0)