Skip to content

Instantly share code, notes, and snippets.

View liuhengyue's full-sized avatar
🎯
Focusing

Hengyue (Henry) Liu liuhengyue

🎯
Focusing
View GitHub Profile
@liuhengyue
liuhengyue / plot_confusion_matrix.png
Created December 5, 2018 09:29 — forked from hitvoice/plot_confusion_matrix.png
Generate matrix plot for confusion matrix with pretty annotations.
plot_confusion_matrix.png
@liuhengyue
liuhengyue / disp_multiple_images.py
Created June 14, 2018 20:44 — forked from soply/disp_multiple_images.py
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.