Boxplot: colors by x value and hues differentiated by pattern

后端 未结 1 1066
暖寄归人
暖寄归人 2020-12-21 12:55

Say I have a boxplot like the one shown below:

\"example\"

I would like to achieve a different coloring

相关标签:
1条回答
  • 2020-12-21 13:23

    The boxes end up in the artists list on the returned axes, so you just need to manipulate the attributes on those objects:

    ax = sns.boxplot(data=x)
    box = ax.artists[0]
    box. set_facecolor("white")
    

    etc.

    0 讨论(0)
提交回复
热议问题