how to show a gray image in matplotlib code example Example: imshow grayscale plt.imshow(im, cmap='gray')