Skip to content

Instantly share code, notes, and snippets.


Ronald Wahome RonKG

View GitHub Profile
RonKG /
Created Oct 29, 2017 — forked from soply/
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.
images: List of np.arrays compatible with plt.imshow.
You can’t perform that action at this time.