概述
I'm having trouble increasing the size of my plot figures using Seaborn (imported as sns). I'm using sns.pairplot to plot columns of a data frame against one another.
%matplotlib inline
plt.rcParams['figure.figsize']=10,10
columns=list(df.columns.values)
g=sns.pairplot(df, kind='reg', x_vars=columns,y_vars = ['Column 1'])
The plots populate with data just fine, but the figure size is too small.
I thought plot.rCParams['figure.figsize'] would control how large the figure is, but it doesn't seem to take effect. I've tried a few different suggestions from online boards, but nothing seems to work.
解决方案
sns.pairplot
"Returns the underlying PairGrid instance for further tweaking"
...for instance changing the figure size:
g=sns.pairplot(df, kind='reg', x_vars=columns,y_vars = ['Column 1'])
g.fig.set_size_inches(15,15)
最后
以上就是玩命小天鹅为你收集整理的python中figsize什么意思_如何在Python Seaborn包中更改图形的大小的全部内容,希望文章能够帮你解决python中figsize什么意思_如何在Python Seaborn包中更改图形的大小所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复