在 python seaborn lmplot 中更改标记大小 [英] changing the marker size in python seaborn lmplot

查看:43
本文介绍了在 python seaborn lmplot 中更改标记大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试更改 seaborn 中 lmplot 标记的大小.我试过将 's' 或 'size' 作为参数传递,但它们都不起作用.

I am trying to change the size of the lmplot markers in seaborn. I have tried passing 's' or 'size' as arguments and neither of them work.

lm = sns.lmplot(x="totalX",y="NormI", hue="Data Type", data=df, palette="Set1", legend_out=False, S=20)

我尝试过s"、markersize"、size",但没有任何效果.我想让图上的数据点更大.非常感谢任何帮助.

I have tried "s", "markersize", "size" I get no effect. I want to make the data points larger on the plot. Any help is much appreciated.

推荐答案

您想使用 scatter_kws={"s": 100}

如:

lm = sns.lmplot(x = "totalX", y = "NormI", hue = "Data Type", data = df, palette="Set1", legend_out=False, scatter_kws={"s": 100})

您可以修改整数值(当前为 100)以更改标记的大小.

You can amend the integer value (currently 100) to change the size of the markers.

我不知道您的 huepalette 数据是什么,但这应该可以工作.

I don't know what your hue or palette data are, but this should work nonetheless.

这篇关于在 python seaborn lmplot 中更改标记大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆