title: matplot imshow add label to each color and put them in legend
body: <p>I want to show an image like below (copied from <a href="http://matplotlib.org/examples/pylab_examples/image_interp.html" rel="nofollow noreferrer">here</a>) in matplotlib</p>
  
  <p><a href="https://i.stack.imgur.com/HCVKf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HCVKf.png" alt="enter image description here"></a></p>
  
  <p>But I want to label each color and put them on a legend on the side, is there way to do that please?</p>