Thanks for your reply Mike.  Looks like fig.add_axes(..) works the best for me for now.  If my situation gets worse I will try and look into calls that allocate window area for the figure/canvas in a container.

Thanks again!

On Mon, Apr 19, 2010 at 6:03 AM, Michael Droettboom <> wrote:
The problem is really that the window is too small, the text is too large, and/or the axes is too large within the figure.

Try one or more of the following:

Replace the values for win.set_default_size to something larger, eg.


Replace the fig.add_subplot call with a fig.add_axes call that explicitly specifies the axes position:

 ax = fig.add_axes((0.2, 0.2, 0.6, 0.6))

Reduce the font size by adding the following to the top:

 from matplotlib import rcParams
 rcParams['font.size'] = 4

Reduce the dpi of the plot:

 fig = Figure(figsize=(5,4), dpi=60)


Vamsi Vytla wrote:
Adding line:

To file (matplotlib examples):

This sets the X-Label under the navigation toolbar.  I am unable to set it such a way that the entire canvas is rendered in the container.

It would be of great help to know how this can be done.


Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.

Matplotlib-users mailing list

Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA