我正在尝试计算一个带有点的图像,当我显示它时它似乎工作得很好:
fig = plt.figure(figsize=(18, 18))
ax = fig.add_subplot(222)
img = imageio.imread(stim_dir + image_name)
# Code to plot points
plt.title("fixation points of " + file_name)
plt.show()
它显示了我想要的图像,不用担心。但是,如果我只是添加到这段代码
plt.savefig(result_dir + file_name + ".png", bbox_inches='tight')
然后将图像保存到正确的文件夹中,但它都是空白的,没有任何标题,任何图像,任何点。只是空白。会出什么问题?