Skip to content

Instantly share code, notes, and snippets.

View Alex-Kopylov's full-sized avatar
🐍
just no

Alex Alex-Kopylov

🐍
just no
  • Georgia, Tbilisi
View GitHub Profile
@soply
soply / disp_multiple_images.py
Last active January 9, 2024 14:52
Plot multiple images with matplotlib in a single figure. Titles can be given optionally as second argument.
import matplotlib.pyplot as plt
import numpy as np
def show_images(images, cols = 1, titles = None):
"""Display a list of images in a single figure with matplotlib.
Parameters
---------
images: List of np.arrays compatible with plt.imshow.