I'm working on an assignment which involves the need to show multiple figures on screen as the script is run (and also to save them). I am having to use both imshow and show to get the images up on the screen. This works fine, but I have read that show() should only be used once per script. Is there another way to display the image? The saved image files are also saving as blank 800x600 white images. Here's my code:
img = np.zeros((100,100))
plt.figure(0)
plt.imshow(img)
plt.show()
plt.savefig("images/img.png")
plt.close(0)
Each other figure is following the same syntax (obviously with different image names and a new figure number.
Thanks!