指定matplotlib输出图片的尺寸

fig = matplotlib.pyplot.gcf()
fig.set_size_inches(18.5, 10.5)
fig.savefig('test2png.png', dpi=100)

猜你喜欢

转载自blog.csdn.net/scott198510/article/details/80218782