我使用以下方法从数据框生成箱线图:
bplot = df.boxplot(column=column_name, by=list1, fontsize=8, layout=(2,1), rot=90,figsize=(25,20))
其中df是我的dataframe
,column_name
是我想要的列,list1
是要用于groupby的列表?
我想用一个字符串标记我的y轴。
plt.ylabel('ylabel')
不起作用。
尝试一下:
bplot.set_ylabel('ylabel')