Skip to content

Commit 5ca4453

Browse files
committed
Merge pull request matplotlib#590 from jrjohansson/master
A GTK3 backend
2 parents 3bfa37a + 6afab09 commit 5ca4453

File tree

7 files changed

+1236
-6
lines changed

7 files changed

+1236
-6
lines changed

lib/matplotlib/backends/backend_cairo.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,10 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False):
200200
if angle:
201201
ctx.rotate (-angle * np.pi / 180)
202202
ctx.set_font_size (size)
203-
ctx.show_text (s.encode("utf-8"))
203+
if sys.version_info[0] < 3:
204+
ctx.show_text (s.encode("utf-8"))
205+
else:
206+
ctx.show_text (s)
204207
ctx.restore()
205208

206209
def _draw_mathtext(self, gc, x, y, s, prop, angle):

0 commit comments

Comments
 (0)