Skip to content

Instantly share code, notes, and snippets.

@vishal-keshav
Created November 2, 2019 17:37
Show Gist options
  • Save vishal-keshav/7d6af44b18e50cb4941ce881547c9a64 to your computer and use it in GitHub Desktop.
Save vishal-keshav/7d6af44b18e50cb4941ce881547c9a64 to your computer and use it in GitHub Desktop.
Plotting a bunch of images with matplotlib

This snippet I often use to output a bunch of sample images in jupyter notebook.

%matplotlib inline
from matplotlib import pyplot as plt
_, axs = plt.subplots(1, 10, figsize=(32, 32))
axs = axs.flatten()
for img, ax in zip(example_images, axs):
    ax.imshow(img)
plt.show()
print(example_labels)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment