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

Skip to content

Commit 9d66b95

Browse files
committed
Merge pull request matplotlib#4105 from cgohlke/patch-1
Fix : Cairo text on Python3 with pycairo
2 parents 21f46ff + 6ba8e7b commit 9d66b95

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
@@ -242,7 +242,7 @@ def _draw_mathtext(self, gc, x, y, s, prop, angle):
242242

243243
size = fontsize * self.dpi / 72.0
244244
ctx.set_font_size(size)
245-
if isinstance(s, six.text_type):
245+
if not six.PY3 and isinstance(s, six.text_type):
246246
s = s.encode("utf-8")
247247
ctx.show_text(s)
248248
ctx.restore()

0 commit comments

Comments
 (0)