|
From: Michael T. <mic...@gm...> - 2009-09-01 15:32:33
|
Hi,
I'm trying to work on the canvas javascript backend I found here
[1]. I'm trying to add text but the canvas origin is at the top left,
how can I transform the co-ordinates from the matplotlib to canvas?
def draw_text(self, gc, x, y, s, prop, angle, ismath=False):
ctx = self.ctx
ctx.font = "12px Times New Roman";
ctx.fillStyle = "Black";
ctx.fillText("%r" % s, x, y)
[1] http://bitbucket.org/sanxiyn/matplotlib-canvas/src/80e9abf6d251/backend_canvas.py
Regards, Michael
|