Skip to content

Instantly share code, notes, and snippets.

@dipanjanS
Created August 16, 2019 12:12
Show Gist options
  • Save dipanjanS/e2d8b8a4ea0539bdb2d7c3b93bcfd6e7 to your computer and use it in GitHub Desktop.
Save dipanjanS/e2d8b8a4ea0539bdb2d7c3b93bcfd6e7 to your computer and use it in GitHub Desktop.
fig, ax = plt.subplots(2, 4, figsize=(14, 6))
for idx, img in enumerate(sample_files):
id1 = 1 if idx > 3 else 0
id2 = idx % 4
img_arr = img_to_array(load_img(img))
f = ax[id1, id2].imshow(img_arr / 255., aspect='auto')
t = ax[id1, id2].set_title(img.split('/')[-1].split('.')[0].split('_')[-1], fontsize=10)
ax[1,3].set_axis_off()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment