title: Barplot savefig() returning an AttributeError
body: <p>I'm converting an iPython notebook to a python script, just trying to output the results of a couple Seaborn plots as png files. Code:</p>
  
  <pre><code>import seaborn as sns
  
  ...
  
  sns.set_style("whitegrid")
  ax = sns.barplot(x=range(1,11), y=[ (x/nrows)*100 for x in addr_pop ], palette="Blues_d")
  ax.savefig("html/addr_depth.png")
  </code></pre>
  
  <p>Don't worry about the variables, they're populated as expected, and I get a great-looking chart in iPyNB. Running the code within a script, however, yields <code>RuntimeError: Invalid DISPLAY variable</code>.</p>
  
  <p>Following another thread, I modified the code, putting this at the top of the script:</p>
  
  <pre><code>import matplotlib
  matplotlib.use('Agg')
  </code></pre>
  
  <p>And tried again. This time, it doesn't seem like the <code>savefig()</code> method is available for the plot at all:</p>
  
  <pre><code>AttributeError: 'AxesSubplot' object has no attribute 'savefig'
  </code></pre>
  
  <p>All the results searching out this error are related to pandas and a plot that is already being displayed. I'm just trying to get Seaborn to output the fig to a file, ideally without displaying it at all.</p>
  
  <p>Any help is appreciated.</p>