x_轴上每个月有两个盒子

2024-05-16 19:57:29 发布

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

我想创建一个方框图,每个月有两个方框图紧挨着彼此。 我试图用同一个图研究两个不同连续变量的月分布

fig, ax = plt.subplots(figsize=(25,5))
sns.boxplot(x='month',y='Total_Batch_change_cal',data=batch_cha_dist,ax=ax)
sns.boxplot(x='month',y='Batch change duration(min)',data=batch_cha_dist)
ax.set(ylabel='Daily Batch change monthly dist (Hour)')
plt.show()

enter image description here


Tags: datadistbatchfigpltaxchangesns