matplotlib.pyplot显示若干秒后自动关闭
matplotlib.pyplot显示若干秒后自动关闭
import matplotlib.pyplot as plt
import numpy as np
file=r"D:\py_machine_learn\handwriting\0.png"
img=plt.imread(file)
plt.set_cmap("gray")
plt.imshow(img)
plt.ion()
plt.pause(1)
plt.close()
# plt.show()