title: Matplotlib subplots_adjust hspace so titles and xlabels don't overlap?
body: <p>With, say, 3 rows of subplots in matplotlib, <code>xlabels</code> of one row can overlap the title of the next.  One has to fiddle with <code>pl.subplots_adjust(hspace)</code>, which is annoying.  </p>
  
  <p>Is there a recipe for <code>hspace</code> that prevents overlaps and works for any nrow?</p>
  
  <pre><code>""" matplotlib xlabels overlap titles ? """
  import sys
  import numpy as np
  import pylab as pl
  
  nrow = 3
  hspace = .4  # of plot height, titles and xlabels both fall within this ??
  exec "\n".join( sys.argv[1:] )  # nrow= ...
  
  y = np.arange(10)
  pl.subplots_adjust( hspace=hspace )
  
  for jrow in range( 1, nrow+1 ):
      pl.subplot( nrow, 1, jrow )
      pl.plot( y**jrow )
      pl.title( 5 * ("title %d " % jrow) )
      pl.xlabel( 5 * ("xlabel %d " % jrow) )
  
  pl.show()
  </code></pre>
  
  <p>My versions: </p>
  
  <ul>
  <li>matplotlib 0.99.1.1, </li>
  <li>Python 2.6.4, </li>
  <li>Mac OSX 10.4.11,</li>
  <li>backend: <code>Qt4Agg</code>  (<code>TkAgg</code> => Exception in Tkinter callback)</li>
  </ul>
  
  <p>(For many extra points, can anyone outline how matplotlib's packer / spacer works, along the lines of chapter 17 "the packer" in the Tcl/Tk book?)</p>