gpt4 book ai didi

python - 无法在 Seaborn stripplot 中使用 'x' 和 '+' 标记

转载 作者:行者123 更新时间:2023-12-04 01:11:16 28 4
gpt4 key购买 nike

我正在尝试使用 seaborn.stripplot() 来做分类图,如下所示,使用可重现的代码:

import seaborn as sns

df = sns.load_dataset('iris')

sns.stripplot(data = df,
x="species", y="sepal_length",
color = 'red',jitter=False,zorder=3, marker='X')

enter image description here

但是当我使用 'x''+''_' 和其他非填充标记作为标记时,它是什么都不返回,为什么这样?

最佳答案

stripplot() 对于未填充的标记很奇怪。标记的线宽发生了一些变化。如果您传递 linewidth=1,您可以让它们出现,但请注意,如果您使用带有“s”的 linewidths,那将不起作用。

sns.stripplot(data = df,
x="species", y="sepal_length",
color='red', jitter=False, marker='x', linewidth=1)

enter image description here

关于python - 无法在 Seaborn stripplot 中使用 'x' 和 '+' 标记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64775341/

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