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

Bst*_*mpe 6 python data-visualization seaborn

我想改变散点的大小。

这些都不起作用:

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)

Bst*_*mpe 8

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

sns.relplot(x='columnx', y='columny', hue='cluster', data=df, s=10)
Run Code Online (Sandbox Code Playgroud)