title: How to move legend to outside of a seaborn scatterplot?
body: <pre><code>import matplotlib.pyplot as plt
  import seaborn as sns
  import pandas as pd
  sns.set(style=&quot;darkgrid&quot;)
  
  g = sns.scatterplot(x=&quot;Area&quot;, y=&quot;Rent/Sqft&quot;, hue=&quot;region&quot;, style=&quot;availability&quot;, data=df)
  </code></pre>
  <p>When I run this I get the below plot.</p>
  <p><a href="https://i.stack.imgur.com/bWrx4.png" rel="noreferrer"><img src="https://i.stack.imgur.com/bWrx4.png" alt="enter image description here" /></a></p>
  <p>I want to move the legend outside of plot. I googled and tried the following</p>
  <pre><code>g.legend(loc='right', bbox_to_anchor=(1.25, 0.5), ncol=1)
  plt.show()
  </code></pre>
  <p>But I don't get any output. Moreover, I can't understand how the object plt is connected to my sns object</p>
  <p>I am using Jupyter Notebook, Python 3.6 and Seaborn 0.9.0.</p>