Re: [matplotlib-devel] tight subplot parameters

2010-07-22 Thread Tony S Yu
On Jul 22, 2010, at 10:07 AM, John Hunter wrote: > On Thu, Jul 22, 2010 at 8:57 AM, Tony S Yu >>> According to backend_bases.FigureCanvas, a renderer attr is not >>> guaranteed either. >>> The Agg* backends rely on get_renderer so that they can get a properly >>> sized renderer on figure resize

Re: [matplotlib-devel] tight subplot parameters

2010-07-22 Thread Michiel de Hoon
--- On Thu, 7/22/10, John Hunter wrote: > We could handle this on the agg side with a property, > or require all canvases to supply get renderer. > Do we actually need a renderer in each of the backends? At least when I was writing the Mac OS X backend, it was not clear to me what functionality

Re: [matplotlib-devel] tight subplot parameters

2010-07-22 Thread John Hunter
On Thu, Jul 22, 2010 at 8:57 AM, Tony S Yu > According to backend_bases.FigureCanvas, a renderer attr is not >> guaranteed either. >> The Agg* backends rely on get_renderer so that they can get a properly >> sized renderer on figure resizes, dpi changes, etc.  We could handle >> this on the agg sid

Re: [matplotlib-devel] tight subplot parameters

2010-07-22 Thread Tony S Yu
On Jul 22, 2010, at 8:59 AM, John Hunter wrote: > On Thu, Jul 22, 2010 at 7:40 AM, Michiel de Hoon wrote: > >> Is a backend required to implement a get_renderer method? I only see it >> implemented in backend_agg.py, and it's missing in backend_bases.py, >> backend_template.py, backend_cairo.

Re: [matplotlib-devel] tight subplot parameters

2010-07-22 Thread John Hunter
On Thu, Jul 22, 2010 at 7:40 AM, Michiel de Hoon wrote: > Is a backend required to implement a get_renderer method? I only see it > implemented in backend_agg.py, and it's missing in backend_bases.py, > backend_template.py, backend_cairo.py, and in the macosx backend. If you want > to try your

Re: [matplotlib-devel] tight subplot parameters

2010-07-22 Thread Michiel de Hoon
--- On Wed, 7/21/10, Tony S Yu wrote: > I get something similar with TkAgg (unfortunately, I get an > AttributeError with the macosx backend). This is the AttributeError: Traceback (most recent call last): File "Desktop/tight_layout.py", line 142, in tight_layout() File "Desktop/tight_l

Re: [matplotlib-devel] tight subplot parameters

2010-07-21 Thread Eric Firing
On 07/21/2010 05:26 PM, John Hunter wrote: > On Wed, Jul 21, 2010 at 10:09 PM, Tony S Yu wrote: >> Wow, I don't see that at all. I'm on OS X, mpl svn HEAD (r8567), and Qt4Agg. >> I don't have GTK installed, so unfortunately, I can't really do a proper >> comparison. Here's the output I get from

Re: [matplotlib-devel] tight subplot parameters

2010-07-21 Thread Eric Firing
On 07/21/2010 05:26 PM, John Hunter wrote: > On Wed, Jul 21, 2010 at 10:09 PM, Tony S Yu wrote: >> Wow, I don't see that at all. I'm on OS X, mpl svn HEAD (r8567), and Qt4Agg. >> I don't have GTK installed, so unfortunately, I can't really do a proper >> comparison. Here's the output I get from

Re: [matplotlib-devel] tight subplot parameters

2010-07-21 Thread Tony S Yu
On Jul 21, 2010, at 11:26 PM, John Hunter wrote: > On Wed, Jul 21, 2010 at 10:09 PM, Tony S Yu wrote: >> Wow, I don't see that at all. I'm on OS X, mpl svn HEAD (r8567), and Qt4Agg. >> I don't have GTK installed, so unfortunately, I can't really do a proper >> comparison. Here's the output I g

Re: [matplotlib-devel] tight subplot parameters

2010-07-21 Thread John Hunter
On Wed, Jul 21, 2010 at 10:09 PM, Tony S Yu wrote: > Wow, I don't see that at all. I'm on OS X, mpl svn HEAD (r8567), and Qt4Agg. > I don't have GTK installed, so unfortunately, I can't really do a proper > comparison. Here's the output I get from your modified script. I get > something similar

[matplotlib-devel] tight subplot parameters

2010-07-21 Thread Tony S Yu
Unused whitespace is a pet-peeve of mine, so I tend to use bbox_inches='tight' when saving figures. However, when producing publications, I want figures with a very specific size (i.e., fit column width of page), but calling bbox_inches='tight' changes the figure size. Stretching to fit is out o