title: How to get numpy.zeros() and (numpy.ones() * 255) to produce a black and white image respectively?
body: <p>I am new to Python + OpenCV, so this might be a basic question for most of you, as I couldn't find a good/ satisfactory solution for this online.</p>
  
  <p>So I am trying to create an Image by separately creating R-G-B layers<br>
  R - Layer of 0s<br>
  G - Layer of 255s<br>
  B - Layer of 255*Identity matrix</p>
  
  <pre><code>import cv2 as cv
  import numpy as np
  import matplotlib.pyplot as plt
  
  Red = np.zeros([6, 6], dtype = np.uint8)
  plt.imshow(Red)        # it is just the red layer which is actually all black
  plt.show()
  
  Green = np.ones([6, 6], dtype = np.uint8) * 255
  plt.imshow(Green)      # it is just the Green layer which is actually all white
  plt.show()
  
  Blue = np.eye(6, dtype = int) * 255
  plt.imshow(Blue)       # it is just the Blue layer which is actually black with white diag
  plt.show()
  
  </code></pre>
  
  <p>But I am actually getting a Purple or combination of purplr and yellow.
  <a href="https://i.stack.imgur.com/ZbG0T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZbG0T.png" alt="My Output"></a></p>
  
  <p>Can someone explain what's happening and/or how to solve it?</p>