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

Skip to content

Commit a0ce9f1

Browse files
committed
Fix Cairo text on Python3 with pycairo
1 parent 76f902c commit a0ce9f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_cairo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
212212
if not isinstance(s, six.text_type):
213213
s = six.text_type(s)
214214
else:
215-
if isinstance(s, six.text_type):
215+
if not six.PY3 and isinstance(s, six.text_type):
216216
s = s.encode("utf-8")
217217

218218
ctx.show_text(s)

0 commit comments

Comments
 (0)