title: Plotting RGB matrix in numpy & matplotlib
body: <p>I'm trying to plot a numpy array with shape [height x width x 3] containing RGB values. As a simple example suppose you have the Belgian flag: </p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  
  flag = np.empty((1,3,3))
  flag[0,0,:] = (0,0,0)
  flag[0,1,:] = (254,240,71)
  flag[0,2,:] = (255,55,14)
  plt.imshow(flag)
  plt.show()
  </code></pre>
  
  <p>This results in the following output: 
  <a href="https://i.stack.imgur.com/76xjX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/76xjX.png" alt="enter image description here"></a></p>
  
  <p>Can anyone tell me why it is not plotting the right RGB values? Did I make a mistake in the dimensionality? Probably an easy answer to this, but can't seem to find it .. Thanks a lot for any advice!</p>