我是靠谱客的博主 玩命小天鹅,最近开发中收集的这篇文章主要介绍python中figsize什么意思_如何在Python Seaborn包中更改图形的大小,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

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包中更改图形的大小所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(46)

评论列表共有 0 条评论

立即
投稿
返回
顶部