title: How do I tell matplotlib that I am done with a plot?
body: <p>The following code plots to two <a href="http://en.wikipedia.org/wiki/PostScript" rel="noreferrer">PostScript</a> (.ps) files, but the second one contains both lines.</p>
  
  <pre><code>import matplotlib
  import matplotlib.pyplot as plt
  import matplotlib.mlab as mlab
  
  plt.subplot(111)
  x = [1,10]
  y = [30, 1000]
  plt.loglog(x, y, basex=10, basey=10, ls="-")
  plt.savefig("first.ps")
  
  
  plt.subplot(111)
  x = [10,100]
  y = [10, 10000]
  plt.loglog(x, y, basex=10, basey=10, ls="-")
  plt.savefig("second.ps")
  </code></pre>
  
  <p>How can I tell matplotlib to start afresh for the second plot?</p>