title: matplotlib adding blue shade to an image
body: <p>I am trying to use matplotlib for basic operations but I see that whenever I try to display an image using matplotlib, a blue shade is added to the image. </p>
  
  <p>For example, </p>
  
  <p>Code:</p>
  
  <pre><code># import the necessary packages
  import numpy as np
  import cv2
  import matplotlib.pyplot as plt
  
  image = cv2.imread("./data/images/cat_and_dog.jpg")
  cv2.imshow('image',image) # Display the picture
  
  
  plt.imshow(image)
  plt.show()
  
  cv2.waitKey(0) # wait for closing
  cv2.destroyAllWindows() # Ok, destroy the window
  </code></pre>
  
  <p>And the images shown by opencv gui and matplotlib are different.</p>
  
  <p><a href="https://i.stack.imgur.com/Qqe4K.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/Qqe4K.jpg" alt="enter image description here"></a></p>
  
  <p>Even the histogram is distorted and not just the display</p>
  
  <p><a href="https://i.stack.imgur.com/KL1X9.png" rel="noreferrer"><img src="https://i.stack.imgur.com/KL1X9.png" alt="enter image description here"></a></p>
  
  <p>How do I avoid this blue shade on an image</p>