解决方法 跟图片宽高设置无关 需要加上:bbox_inches='tight' plt.savefig(path+sm+"_bedcoor.png",dpi=400,bbox_inches='tight') plt.clf()