图示:
知识点:
1、添加表格
plt.table(cellText=值, cellLoc="center", colWidths=[0.1] * 5, colLabels=列标签, rowLabels=行标签, rowLoc="center", bbox=(0.5,0.05,0.5,0.15) )
2、参数:
cellText:值,多层列表[[1,2,3],[]]
cellLoc:单元格居中
rowLoc:行居中
bbox=(x,y,width,height)
colLabels:[列标签]
rowLabels:[行标签]
colWidths:[列宽] [0.1]*5可生成[0.1,0.1,0.1,0.1,0.1]
代码: