title: Colorbar of imshow and contour overlapped
body: <p>I am trying to get a colorbar that contains the values of the imshow and has the 3 lines of the contours overplotted. One of the matplotlib examples shows something that is close, but they only have colored contours. This image has a colorbar of the type that I would like though. </p>
  
  <p><a href="https://i.stack.imgur.com/YvuNM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YvuNM.png" alt=""></a></p>
  
  <p>Here is my code and image, and it just ignores the colorbar of the cmap of the imshow.</p>
  
  <pre><code>plt.imshow(Bho, origin='l')
  plt.contour(Bho, [300,400,500],origin='lower', colors=['white', 'yellow', 'red'])
  plt.colorbar()
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/hfWcx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hfWcx.png" alt="enter image description here"></a></p>