pyplot.axis(‘off’) #增加这行关闭坐标轴显示,但仍有空白区域
添加这个就可以了,去掉空白区域
bbox_inches = 'tight',pad_inches = 0
plt.savefig(save_dir,bbox_inches = 'tight',pad_inches = 0)
pyplot.axis(‘off’) #增加这行关闭坐标轴显示,但仍有空白区域
添加这个就可以了,去掉空白区域
bbox_inches = 'tight',pad_inches = 0
plt.savefig(save_dir,bbox_inches = 'tight',pad_inches = 0)