On Tue, Sep 1, 2009 at 10:32 AM, Michael Thompson<michae...@gmail.com> wrote:
> 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

The backend canvas should know its height, so height-y should
transform from bottom to top

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to