[matplotlib-devel] Automatically make room for tick labels FAQ entry

2009-09-01 Thread jason-sage
In the FAQ, there is an entry about adjusting subplot parameters to make room for really long tick labels: http://matplotlib.sourceforge.net/faq/howto_faq.html#automatically-make-room-for-tick-labels I made the example a little more general and included a utility function that takes care of ti

Re: [matplotlib-devel] Canvas HTML5 backend

2009-09-01 Thread Jae-Joon Lee
On Tue, Sep 1, 2009 at 6:03 PM, Michael Thompson wrote: > I see firefox 3.5 (html5) has a method to measure the width of the > text, I'll look at using this in a javascript function to render the > text. I'm not sure if this helps. *Matplotlib* (not the browser) needs to know the size of the text

Re: [matplotlib-devel] Canvas HTML5 backend

2009-09-01 Thread Michael Thompson
2009/9/1 Jae-Joon Lee : > My understanding is that all the backends should use left-bottom > alignment. Text alignment in matplotlib is handled by mpl itself (not > by the backend), and for this to work, you have to define > get_text_width_height_descent method correctly. > > The real question is h

Re: [matplotlib-devel] Canvas HTML5 backend

2009-09-01 Thread Jae-Joon Lee
On Tue, Sep 1, 2009 at 12:57 PM, Michael Thompson wrote: > 2009/9/1 John Hunter : >> On Tue, Sep 1, 2009 at 10:32 AM, Michael Thompson 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, >>> h

Re: [matplotlib-devel] Canvas HTML5 backend

2009-09-01 Thread Michael Thompson
2009/9/1 John Hunter : > On Tue, Sep 1, 2009 at 10:32 AM, Michael Thompson 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 canva

Re: [matplotlib-devel] Canvas HTML5 backend

2009-09-01 Thread John Hunter
On Tue, Sep 1, 2009 at 10:32 AM, Michael Thompson 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,

Re: [matplotlib-devel] spines with 'axes' positions show in wrong place?

2009-09-01 Thread Andrew Straw
jason-s...@creativetrax.com wrote: > Do the right and top spines display correctly when the position is set > using 'axes' coordinates? > Jason, This looks like a bug. I'll look into it. Please ping me in a few days if you haven't heard back. -Andrew -

[matplotlib-devel] Canvas HTML5 backend

2009-09-01 Thread Michael Thompson
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

[matplotlib-devel] spines with 'axes' positions show in wrong place?

2009-09-01 Thread jason-sage
Do the right and top spines display correctly when the position is set using 'axes' coordinates? import matplotlib.pyplot as plt import numpy as np fig = plt.figure() x = np.linspace(0,2*np.pi,100) y = 2*np.sin(x) ax = fig.add_subplot(1,1,1) ax.set_title('centered spines') ax.plot(x,y) ax.spines[