title: plt.gray() is not working and displaying original color image in matplotlib
body: <p>With the following code, <em>plt.gray()</em> is not working and showing a colour image instead of grayscale. Even I put <em>cmap=&quot;gray&quot;</em> separately in <em>plt.imshow</em>, still it is showing the image in colour. Thank you. (Please note, the original image <em>smallimage.jpg</em> is a colour image)</p>
  <pre><code>from matplotlib import image as image, pyplot as plt
  img  = image.imread('/content/drive/MyDrive/Z ML Lab/data/smallimage.jpg')
  plt.gray()
  plt.imshow(img, cmap=&quot;gray&quot;)
  </code></pre>