title: MNIST Matplotlib: showing color
body: <p>I am exploring the MNIST dataset which is a collection of gray-scale handwritten digit images. I am using Matplotlib to plot random images from the dataset:</p>
  
  <pre><code>plt.subplot(221)
  plt.imshow(X_train[1],cmap='gray')
  plt.subplot(222)
  plt.imshow(X_train[100])
  plt.subplot(223)
  plt.imshow(X_train[4559])
  plt.subplot(224)
  plt.imshow(X_train[50000])
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/lGG5u.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lGG5u.png" alt="This is the plot I got"></a></p>
  
  <p>My question is why the images are coming up as colored when I don't explicitly set <code>cmap='gray'</code>.</p>
  
  <p>Shouldn't they all appear as grayscale images by default as that's their true nature?</p>