title: Using with sns.set in seaborn plots
body: <p>I have searched for a clear answer to this and have not been able to find one, I apologize if this has been asked previously. I'm using seaborn 0.6 with matplotlib 1.4.3. I would like to temporarily change the styles of plots as I am creating many figures in an ipython notebook.</p>
  
  <p>Specifically, in this example, I would like to change both the font size and the background style on a per-plot basis.</p>
  
  <p>This creates the plot I am looking for but defines parameters globally:</p>
  
  <pre><code>import seaborn as sns
  import numpy as np
  
  x = np.random.normal(size=100)
  
  sns.set(style="whitegrid", font_scale=1.5)
  sns.kdeplot(x, shade=True);
  </code></pre>
  
  <p>however this fails:</p>
  
  <pre><code>with sns.set(style="whitegrid", font_scale=1.5):
      sns.kdeplot(x, shade=True);
  </code></pre>
  
  <p>with:</p>
  
  <pre><code>---------------------------------------------------------------------------
  AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-10-70c5b03f9aa8&gt; in &lt;module&gt;()
  ----&gt; 1 with sns.set(style="whitegrid", font_scale=1.5):
        2     sns.kdeplot(x, shade=True);
  
  AttributeError: __exit__
  </code></pre>
  
  <p>I also tried:</p>
  
  <pre><code>with sns.axes_style(style="whitegrid", rc={'font.size':10}):
      sns.kdeplot(x, shade=True);
  </code></pre>
  
  <p>Which does not fail, however it also does not change the size of the font. Any help would be much appreciated.</p>