gpt4 book ai didi

python - 如何更改 Seaborn 的 relplot(seaborn.relplot 不是 regplot)上的散点大小? Seaborn 0.9.0

转载 作者:行者123 更新时间:2023-12-03 15:57:19 27 4
gpt4 key购买 nike

我想改变散点的大小。

这些都不起作用:

sns.relplot(x='columnx', y='columny', hue='cluster', data=df)

sns.relplot(x='columnx', y='columny', hue='cluster',
scatter_kws={'s':.01}, data=df)

sns.relplot(x='columnx', y='columny', hue='cluster', kwargs={'s':.01},
data=df)

最佳答案

由于底层函数是matplotlib.pyplot.scatter(x, y, s=None) , 将 s=None 填充为合适的整数会更改所有点的大小。

sns.relplot(x='columnx', y='columny', hue='cluster', data=df, s=10)

关于python - 如何更改 Seaborn 的 relplot(seaborn.relplot 不是 regplot)上的散点大小? Seaborn 0.9.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51523852/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com