具体方法:
import matplotlib.pyplot as plt
plt.axis('off') # 去除坐标轴
plt.xticks([]) # 去除刻度
plt.yticks([]) # 去除刻度
plt.imshow(img)
plt.savefig("./save/" + random_str + ".png", bbox_inches="tight",pad_inches=0)
具体方法:
import matplotlib.pyplot as plt
plt.axis('off') # 去除坐标轴
plt.xticks([]) # 去除刻度
plt.yticks([]) # 去除刻度
plt.imshow(img)
plt.savefig("./save/" + random_str + ".png", bbox_inches="tight",pad_inches=0)