With savefig('foo.pdf')
or savefig('foo.png')
, it seems like we can only plot one thing to one file (foo.png
or foo.pdf
) at a time. Is there a way to plot multiple images to the same file, one after another?
I need something like this:
for center in centers:
plt.imshow(center.reshape(28, 28))
plot/save this current image to file, all in the same file
So I just want all of the reshaped, 28 by 28 images contained in the centers
list in the same file.
For many months, I've had to plt.show()
each image, take screenshots of those individual images, and then crop and paste them into one file. But this obviously doesn't scale.