matplotlib 在迭代图的for循环上使用plt.savefig返回空白图像您应该尝试在plt.savefig(outfilename+str(ID[...
先保存图片,最后show,即:将plt.savefig()放在plt.show()之前。 plt.imshow(image.read_value()[0])plt.savefig('xxx.png')plt.show() Reference:https://stackoverflow.com/questions/9012487/matplotlib-pyplot-savefig-outputs-blank-image