我正在绘制分组熊猫数据帧
score = pd.DataFrame()
score['Score'] = svm_score
score['Wafer_Slot'] = desc.Wafer_Slot[test_index].tolist()
gscore = score.groupby('Wafer_Slot')
score_plot = [score for ws, score in gscore]
ax = gscore.boxplot(subplots=False)
ax.set_xticklabels(range(52)) # does not work
plt.xlabel('Wafer Slot')
plt.show()
它工作得很好,但是x
轴是不可能读取的,因为有许多数字重叠。我希望x
轴是boxplot的计数器。在
我怎么能做到呢?在
boxplot
方法不像DataFrames和Series的plot
方法返回axes对象。试试这个:boxplot
方法按外观返回line对象的dict
或{相关问题 更多 >
编程相关推荐