I want to display MNIST images as a composite image using matplotlib. Right now it is displaying the individual images on a horizontal plane (1 row, x columns) but there is whitespace between each image.
How can I bring the images right next to each other (removing the vertical whitespace between each MNIST image) so it looks like 1 single image?
Here is the relevant part of my code:
for x in range(5):
digit = train_images[x]
plt.box(False)
plt.subplot(1, 5, x+1)
plt.imshow(digit)
plt.axis('off')
plt.grid(b=None)
#plt.title('50419 -- my Name', loc='center')
plt.show()
This is what the current output looks like:
