Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-11 Thread Yuri D'Elia
On Sun, 6 Mar 2011 21:47:04 +0900 Jae-Joon Lee lee.j.j...@gmail.com wrote: Ok, I can understand that, but shouldn't all artists used to construct the picture, as suptitle, be considered? I think considering all the artists is not very practical (as some of them could have spline

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-08 Thread Yuri D'Elia
On Mon, 7 Mar 2011 13:41:49 -0600 Benjamin Root ben.r...@ou.edu wrote: I've been using matplotlib a lot the last few months and was totally unaware that pyplot was required. Good thing I read this message! :-) I'm glad I'm not the only one :) The interface should create the figure

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-07 Thread Yuri D'Elia
On Fri, 4 Mar 2011 14:57:34 -0600 Benjamin Root ben.r...@ou.edu wrote: Which version of matplotlib are you using? This example works for me using the latest matplotlib from source. Also, why the awkward usage and Yes, with matplotlib 1.0 bbox_extra_artists now works. I consider

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-07 Thread Yuri D'Elia
On Mon, 7 Mar 2011 11:36:45 +0100 Yuri D'Elia wav...@users.sf.net wrote: On Fri, 4 Mar 2011 14:57:34 -0600 Benjamin Root ben.r...@ou.edu wrote: Which version of matplotlib are you using? This example works for me using the latest matplotlib from source. Also, why the awkward usage and

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-07 Thread Yuri D'Elia
On Mon, 7 Mar 2011 09:25:23 -0600 Benjamin Root ben.r...@ou.edu wrote: The problem is that you are creating your figure wrong. Try this: import matplotlib as mpl mpl.use(Agg) import matplotlib.pyplot as plt fig = plt.figure(figsize=(20, 20)) ax = fig.add_subplot(111)

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-07 Thread Benjamin Root
On Mon, Mar 7, 2011 at 10:33 AM, Yuri D'Elia wav...@thregr.org wrote: On Mon, 7 Mar 2011 09:25:23 -0600 Benjamin Root ben.r...@ou.edu wrote: The problem is that you are creating your figure wrong. Try this: import matplotlib as mpl mpl.use(Agg) import matplotlib.pyplot as plt

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-07 Thread Jae-Joon Lee
On Mon, Mar 7, 2011 at 7:36 PM, Yuri D'Elia wav...@users.sf.net wrote: I consider bbox_extra_artists some kind of a hack (IMHO, all artists should be considered with a 'tight' box), but coming from gnuplot/asymptote maybe my point of view is biased. What would be the point of a 'tight' box

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-07 Thread Yuri D'Elia
On Tue, 8 Mar 2011 02:03:54 +0900 Jae-Joon Lee lee.j.j...@gmail.com wrote: On Mon, Mar 7, 2011 at 7:36 PM, Yuri D'Elia wav...@users.sf.net wrote: In fact, supporting the bbox_inches is a real hack. As I mentioned in my previous email, matplotlib artists can have spline paths. And artists can

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-07 Thread Benjamin Root
On Mon, Mar 7, 2011 at 11:09 AM, Yuri D'Elia wav...@users.sf.net wrote: On Tue, 8 Mar 2011 02:03:54 +0900 Jae-Joon Lee lee.j.j...@gmail.com wrote: On Mon, Mar 7, 2011 at 7:36 PM, Yuri D'Elia wav...@users.sf.net wrote: In fact, supporting the bbox_inches is a real hack. As I mentioned in

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-07 Thread Jae-Joon Lee
On Tue, Mar 8, 2011 at 2:20 AM, Benjamin Root ben.r...@ou.edu wrote: And this appears to be a bug.  Looks like the call signature for the legend object's get_window_extent() doesn't match the call signature for all other artists. Yes. It is a bug. Meanwhile, you may use

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-07 Thread Brendan Barnwell
On 2011-03-07 08:59, Benjamin Root wrote: On Mon, Mar 7, 2011 at 10:33 AM, Yuri D'Eliawav...@thregr.org wrote: I was reading this at the time: http://matplotlib.sourceforge.net/faq/usage_faq.html I inferred pyplot was just a matlab-like interface on top of matplotlib, and figured using

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-07 Thread Benjamin Root
On Mon, Mar 7, 2011 at 12:42 PM, Brendan Barnwell brenb...@brenbarn.netwrote: On 2011-03-07 08:59, Benjamin Root wrote: On Mon, Mar 7, 2011 at 10:33 AM, Yuri D'Eliawav...@thregr.org wrote: I was reading this at the time: http://matplotlib.sourceforge.net/faq/usage_faq.html I

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-04 Thread Yuri D'Elia
On Wed, 2 Mar 2011 22:01:02 +0900 Jae-Joon Lee lee.j.j...@gmail.com wrote: Is this a bug? Unfortunately, bbox_inches option is never meant to be complete in figuring out the exact  size of the figure area. Why not? What's the purpose of bbox_inches='tight' otherwise? Figuring

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-04 Thread Benjamin Root
On Wed, Mar 2, 2011 at 8:46 AM, Yuri D'Elia wav...@thregr.org wrote: On Wed, 2 Mar 2011 22:01:02 +0900 Jae-Joon Lee lee.j.j...@gmail.com wrote: Is this a bug? Unfortunately, bbox_inches option is never meant to be complete in figuring out the exact size of the figure area.

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-02 Thread Yuri D'Elia
On Tue, 1 Mar 2011 12:44:20 +0900 Jae-Joon Lee lee.j.j...@gmail.com wrote: Is this a bug? Unfortunately, bbox_inches option is never meant to be complete in figuring out the exact size of the figure area. Why not? What's the purpose of bbox_inches='tight' otherwise? However, you can

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-02-28 Thread Jae-Joon Lee
On Fri, Feb 25, 2011 at 9:15 PM, Yuri D'Elia wav...@users.sf.net wrote: In the following: import matplotlib as mpl import matplotlib.figure import matplotlib.backends.backend_agg fig = mpl.figure.Figure() cvs = mpl.backends.backend_agg.FigureCanvasAgg(fig) fig.set_size_inches((20,20))

[Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-02-25 Thread Yuri D'Elia
In the following: import matplotlib as mpl import matplotlib.figure import matplotlib.backends.backend_agg fig = mpl.figure.Figure() cvs = mpl.backends.backend_agg.FigureCanvasAgg(fig) fig.set_size_inches((20,20)) fig.suptitle(Horray!, fontsize=20) plot = fig.add_subplot(111)