我尝试violin在Seaborn的情节中为每个小提琴使用不同的颜色,如下所示:
sns.violinplot(x='type', y='den', data=mydf, ax=axes[0], color=['red','blue','yellow'])
Run Code Online (Sandbox Code Playgroud)
但是我得到了:
ValueError:to_rgb:无效的rgb arg“(''red','blue','yellow')”无法将字符串转换为float:红色