title: Matplotlib: remove warning about matplotlib.use()
body: <p>In a Python module where I use <code>matplotlib</code>, I want to make sure it works also when I run the script on a remote machine via <code>ssh</code>. So I do:</p>
  
  <pre><code>import matplotlib
  matplotlib.use('Agg')
  from matplotlib.backends.backend_pdf import PdfPages
  import matplotlib.mlab as mlab
  import matplotlib.pyplot as plt
  import numpy as np
  import pylab
  import scipy.stats
  import scipy.stats.mstats
  </code></pre>
  
  <p>It works. Too bad that when I run it <strong>directly</strong> on a machine (<strong>not a remote one</strong>!), it gives me the following warning:</p>
  
  <blockquote>
    <p>This call to matplotlib.use() has no effect because the the backend
    has already been chosen; matplotlib.use() must be called <em>before</em>
    pylab, matplotlib.pyplot, or matplotlib.backends is imported for the
    first time.</p>
  </blockquote>
  
  <p>How do I remove this message?</p>