title: python - matplotlib - disable plot to screen - set to Agg only
body: <p>I'm getting this problem (asked about before), and can't see how to fix it:</p>
  
  <pre><code>import matplotlib
  print dir()
  matplotlib.use('Agg')
  from scipy import ndimage
  import matplotlib.pyplot as plt
  from matplotlib.patches import Circle
  </code></pre>
  
  <p>gives</p>
  
  <p>This call to matplotlib.use has no effect because the the backend has already been chosen;
  use must be called <em>before</em> pylab, matplotlib.pyplot, or matplotlib.backends is imported for the first time.</p>
  
  <p>I can't place the use call any higher. As suggested, I've set $DISPLAY to localhost:0. I quite need to suppress the displayed figures, and, rather, output solely to file.</p>
  
  <p>This is all on a Mac with enthought python.</p>
  
  <p>Thanks!</p>