Skip to content

Instantly share code, notes, and snippets.

@shgidi
Last active July 4, 2017 17:58
Show Gist options
  • Save shgidi/ae57ae6e4e376b279761eff519c91170 to your computer and use it in GitHub Desktop.
Save shgidi/ae57ae6e4e376b279761eff519c91170 to your computer and use it in GitHub Desktop.
from matplotlib import pyplot as plt
import numpy as np
%matplotlib inline
#show and tell
fig = plt.figure(figsize=(16,12))
n_images_per_row=4
choices=np.random.choice(len(imgs),16)
#choices=range(16)
for i,id in enumerate(choices):
ax = fig.add_subplot(4,n_images_per_row,i+1)
plt.imshow(imgs[id].astype('uint8'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment