如何在violinplot中复制kdeplot的阴影?

2024-09-29 19:30:27 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图复制seaborn在小提琴情节中的kdeplotshade=True显示。你知道吗

enter image description here

但是,sns.violinplot()不接受shade参数。我可以使用ax.collections[0]访问violinplot中的axis集合,然后同时使用set_facecolor()set_edgecolor()更改绘图颜色。但是,我不知道如何给绘图的facecolor指定alpha值。我可以使用set_alpha(),但这会设置面和边颜色的alpha值。你知道吗

enter image description here


Tags: alphatrue绘图参数颜色seabornaxcollections

热门问题