我正在努力处理matplotlib中的情节边距.我使用下面的代码生成我的图表:
plt.imshow(g) c = plt.colorbar() c.set_label("Number of Slabs") plt.savefig("OutputToUse.png")
但是,我得到了一个输出数字,在图的两侧有很多空白区域.我搜索了谷歌并阅读matplotlib文档,但我似乎无法找到如何减少这一点.
python matplotlib
matplotlib ×1
python ×1