title: spyder matplotlib UserWarning: This call to matplotlib.use() has no effect because the backend has already been chosen
body: <p>So I'm trying to write a piece of code that creates a figure, but in order for it to run on the computer that I want it to (school one), I can't use the x-window backend to create the figure. I tried switching the backend use (I have the matplotlib.use('Agg') statement in my code), but whenever it creates the figure, it gives me 3 colorbars on the figure when I just want one. It also gives me the error</p>
  
  <pre><code>UserWarning:  This call to matplotlib.use() has no effect
  because the backend has already been chosen;
  matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
  or matplotlib.backends is imported for the first time.
  
  warnings.warn(_use_error_msg)
  </code></pre>
  
  <p>My code starts like this:</p>
  
  <pre><code>import matplotlib
  matplotlib.use('Agg')
  from mpl_toolkits.basemap import Basemap
  import numpy as np
  import matplotlib.pyplot as plt
  from pylab import *
  </code></pre>
  
  <p>Any ideas or help?</p>