another incorrectly clipped PNG in the gallery

In article
<AANLkTinJBFO6ZioH1J_w=0Ut-Xur0CK1y8FsAANt1t9X@...288...>,

> Until a more permanent solution is figured out, can anyone recommend
> any workarounds, even if they are a little clunky? I'm embedding mpl
> plots in wxPython and am also finding this issue suboptimal.

Change your subplots adjust parameters to make the default bottom,
left, wspace and hspace wider. This will reduce the chance of
overlaps.

http://matplotlib.sourceforge.net/search.html?q=subplots_adjust

The defaults can be changed in your rc file

  http://matplotlib.sourceforge.net/users/customizing.html

See also these recipes on the FAQ to automatically choose boundaries

  http://matplotlib.sourceforge.net/faq/howto_faq.html#move-the-edge-of-an-axe
  s-to-make-room-for-tick-labels

  http://matplotlib.sourceforge.net/faq/howto_faq.html#automatically-make-room
  -for-tick-labels

Automatic layout to avoid overlap is not an easy problem -- Michael
Droetboom worked on it for a while but didn't get to a satisfactory
point. So far our philosophy has been : make it easy to customize
rather than do it automatically. I realize this is not always a good
approach, especially in automated figure generators where you don't
have access to the data ahead of time.

One possibility is to offer a mode whereby the font size for the
annotations is fixed. It is then much easier to figure out how large a
particular annotation must be before laying out the graph. That ought to
make it much easier to leave enough room for axis labels and such.

Ideally in this mode the automatic layout would be improved so that axis
labels were always visible. But even if that was a planned feature that
was not initially implemented, having fixed font size would allow users
to more easily lay things out as desired.

-- Russell

···

John Hunter <jdh2358@...287...> wrote:

On Wed, Sep 22, 2010 at 8:31 PM, C M > <cmpython@...287...> wrote: