8000 Update lib/matplotlib/backends/backend_cairo.py · matplotlib/matplotlib@cb419a9 · GitHub
[go: up one dir, main page]

Skip to content

Commit cb419a9

Browse files
committed
Update lib/matplotlib/backends/backend_cairo.py
1 parent 034b12b commit cb419a9

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)
0