首页 > 解决方案 > matplotlib表中的方形单元格?

问题描述

我想从数组中的值显示数独网格。

这是我的代码

fig, ax =plt.subplots(1,1)
ax.axis('tight')
ax.axis('off')
ax.table(cellText=sudoku2,loc="center")
plt.show()

这是我的输出 数独网格

如何让单元格成为正方形?我迷路了。

标签: matplotlibsudokumatplotlib-table

解决方案


推荐阅读