title: Matplotlib subplots figure - savefig() won't output PDF. "NoneType" error
body: <p>The following is a stripped-down version of a code I am writing to make a figure with several subplots. The problem arises in the last line, <code>fig.savefig("foo" + ".pdf", format='pdf')</code>. I get the following error:</p>
  
  <pre><code>AttributeError: "'NoneType' object has no attribute 'print_figure'"
  </code></pre>
  
  <p>Can anyone tell me what's wrong? Thanks!</p>
  
  <pre><code>import matplotlib.pyplot as plt
  from pdb import set_trace as st
  import numpy as np
  
  
  Time   = np.array([0,1,2,3,4])
  Load   = np.array([1,2,3,4,5])
  Cell   = np.array([6,9,2,5,4])
  
  axialLoadDueToCellPressure = 5.5 * Cell
  
  volumePlotFormat = 'double-wide'
  
  fig = plt.Figure()
  ax1 = plt.subplot2grid((3,2), (0,0))
  
  
  ax1.plot((Time/1000/60),
      (Load + axialLoadDueToCellPressure)/6, 'k-')
  
  ax1.plot((Time/1000/60), Cell, 'k--')
  
  st()
  fig.savefig("foo" + ".pdf", format='pdf')
  </code></pre>