Few weeks ago when I was preparing the dataset, the visualization of MNIST images were in gray-scale even with out using cmap='Greys'
. But now the images are displayed in different color if cmap is not used(image shown below).
So I am a bit confused on whats going on.
Is it normal? if not what can I do to bring the images to their normal form?
Asked
Active
Viewed 227 times
0

Sameer Kattel
- 11
- 5
-
Use cmap='gray' in you plot function and refer this link : https://stackoverflow.com/q/37228371/10077354 – Suraj Mar 24 '20 at 04:56
-
Thank you so much.. But I have no problem is visualizing the image. My actual question is.. "Is the visualization of image with different color as shown in the image above without using cmap normal?" – Sameer Kattel Mar 24 '20 at 05:08
-
Yes it is normal. – Suraj Mar 24 '20 at 05:11
-
When no colormap is given, matplotlib uses ['viridis'](https://matplotlib.org/3.1.0/tutorials/colors/colormaps.html) as default. It goes from purple over blue and greens to yellow. The explanation and the history are memorized in [this video](https://www.youtube.com/watch?v=xAoljeRJ3lU). – JohanC Mar 24 '20 at 19:34