axis label placement

If I have axis labels with line returns in them, they end up

    > overlapping with the plot area and other elements in the
    > figure. Is there a way to change their placement to move
    > them away from the plot? Is there a way to define the area
    > occupied by a subplot to include the axis labels and titles
    > such that multiple subplots do not have overlapping text?
    > (This is related to another question I just posted, but I
    > tried to separate these issues for easier referencing by
    > others later on).

There is no way to do this automatically at present. You can
explicitly define the size of your axes so that they don't overlap
each other, but this can take some trial and error. subplot is just a
special case of axes that specifies the left, bottom, width, height
rectangle of the axes in a matlab consistent way.

The axes coordinates are normalized as fractions of the entire
figure. See ganged_plots and axes_demo.py in the examples directory
of the matplotlib src distribution for examples of setting the axes
boundaries explicitly.

It is possible to write some automatic axes layout functions similar
to the ones you are looking for, eg, place axes 2 below axes 1 taking
into account tick labels and so on, but they doesn't currently exist.

It's also possible to write some GUI interaction code so these can be
dynamically resized - I can post some example code if you like.

The other things you may want to consider are

  * decreasing the tick padding (the spacing between the axes and tick label
    With the latest matplotlib this is controlled by tick.major.pad in
    the rc file

  * use a smaller tick font size, controlled by tick.labelsize

Hope this helps,
JDH