How to use plt.figure () for Seaborn in Python
This article mainly shows you "how Seaborn in Python uses plt.figure ()". The content is simple and clear. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how to use plt.figure () in Seaborn in Python".
Plt.figure ()
Drawing usually benefits from resizing. If we want to resize, we can do this:
# figure plt.figure (figsize= (9,5)) sns.scatterplot (data=df, alpha=0.7, hue='species', size='gender')
When we resize, the legend moves to the upper left corner. Let's move the legend out of the chart so that it does not accidentally overwrite the data points:
# figure plt.figure (figsize= (9,5)) sns.scatterplot (data=df, xylene bodyweight massages, alpha=0.7, hue='species', size='gender') plt.legend (loc='upper right', bbox_to_anchor= (1.2,1))
If you want to know how to know what word combinations figsize () or bbox_to_anchor () use, you need to try which numbers are best suited for drawing.
The above is all the content of the article "how to use plt.figure () for Seaborn in Python". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!