This forum post provides a solution to this. In short, you want to run this line at the top of the notebook which should change the colormap to gray:
matplotlib.rc('image', cmap='Greys')
In terms of how show_image
actually works, here is the source code. From my understanding, after some pre-processing of the image data, the main line which plots the image is ax.imshow(im, **kwargs)
which comes from matplotlib.