[英]Change marker size in seaborn pairplot with kind reg
I want to reduce marker size in seaborn 0.9.0 pairplot using kind = 'reg'
我想使用
kind = 'reg'
减少seaborn 0.9.0配对图中的标记尺寸
I have tried: 我努力了:
sns.pairplot(a_dataframe, kind="reg", s=1)
TypeError: pairplot() got an unexpected keyword argument 's'
sns.pairplot(a_dataframe, kind="reg", scatter_kws={'s':2})
pairplot() got an unexpected keyword argument 'scatter_kws'
sns.pairplot(a_dataframe, kind="reg", plot_kws=dict(s=1))
regplot() got an unexpected keyword argument 'plot_kws'
You have to chain the kwargs, first to pass them on to sns.regplot
, which is used to plot the off-diagonal plots. 你必须链接kwargs,首先将它们传递给
sns.regplot
,用于绘制非对角线图。 sns.regplot
itself accepts a scatter_kws=
argument to be passed to plt.scatter()
which is the function that actually draws the scatter plot. sns.regplot
本身接受一个scatter_kws=
参数传递给plt.scatter()
,这是实际绘制散点图的函数。
iris = sns.load_dataset("iris")
g = sns.pairplot(iris, kind="reg", plot_kws=dict(scatter_kws=dict(s=2)))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.