用Python画出一个箱型图后,怎么调整图像的位置及图名

用Python画出一个箱型图后,怎么调整图像的位置及图名

问题描述:

1.我得到了一下的图形,但是表头的名字可不可以删掉呢

img

dataeedi2 = df_eedi[['Type','TechnicalEfficiencyValue']]
dataeedi2.boxplot(by='Type',column='TechnicalEfficiencyValue')
plt.xticks(rotation=90)
plt.ylabel('TechnicalEfficiencyValue')

2.还有一个是箱型图图像重叠了,该怎么操作呢

img

plt.boxplot(df_eedi['TechnicalEfficiencyValue'],labels=['EEDI'])
plt.boxplot(df_evi['TechnicalEfficiencyValue'],labels=['EVI'])
plt.tight_layout()
plt.show()

试试这样,用matplotlib中的boxplot绘制:
data=[df_evi['TechnicalEfficiencyValue'].tolist(),df_eedi['TechnicalEfficiencyValue'].tolist()]
plt.boxplot(data,labels=['EVI','EEDI'])