From 391fc691aab718fc33d2b4197bc25a17a6500b0e Mon Sep 17 00:00:00 2001 From: Maksim Rakitin Date: Tue, 3 Apr 2018 13:25:22 -0400 Subject: [PATCH] Add a simple plot_image() function --- startup/99-utils.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 startup/99-utils.py diff --git a/startup/99-utils.py b/startup/99-utils.py new file mode 100644 index 0000000..cc3b287 --- /dev/null +++ b/startup/99-utils.py @@ -0,0 +1,9 @@ +from PIL import Image +import matplotlib.pyplot as plt + + +def plot_image(filepath, **kwargs): + plt.ion() + img = np.array(Image.open(filepath)) + plt.imshow(img, **kwargs) +