Skip to content

Instantly share code, notes, and snippets.

@qmaruf
Created October 12, 2019 13:14
Show Gist options
  • Save qmaruf/a229f88652d1f7ae3ee7375d7b809765 to your computer and use it in GitHub Desktop.
Save qmaruf/a229f88652d1f7ae3ee7375d7b809765 to your computer and use it in GitHub Desktop.
def plot_us(imgs, titles=None):
fig, axs = plt.subplots(nrows=1, ncols=len(imgs), figsize=(15, 15))
axs = np.array(axs).reshape(1, -1)
for i, img in enumerate(imgs):
axs[0, i].imshow(img)
if titles not None:
axs[0, i].set_title(titles[i])
axs[0, i].set_axis_off()
plt.grid()
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment