Huangjiamai 2022-09-14 17:52 采纳率: 33.3%
浏览 87
已结题

python数据处理 表格显示不全

问题遇到的现象和发生背景

python 界面设计 插入表格使用matplotlib模块 由于 有的数据太多 显示不全 怎么办

用代码块功能插入代码,请勿粘贴截图

img

#画表格
            self.ax2.cla()
            tab=self.ax2.table(
            cellText=[[i] for i in y],
            #colLabels=['Error Code'],
            colLabels=['number'],
            rowLabels=x, 
            rowLoc="center",       
            loc="center"  ,       
            cellLoc="center"
                    )
            tab.scale(1,2) 
            self.ax2.axis('off')
            self.fig2.draw()
            

我想要达到的结果

img

  • 写回答

3条回答 默认 最新

  • Norcor 2022-09-14 20:07
    关注

    考虑过拓展画布大小嘛?
    思路一:缩小图像
    思路二:放大画布,参考官网:https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.figure.html

    评论

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 9月16日
  • 创建了问题 9月14日