title: Adding markers or lines to colorbar in matplotlib
body: <p>I have the following lines of code to generate a heatmap (<code>pcolormesh</code>).</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  
  vals = np.linspace(-np.pi/2, np.pi/2, 101)
  x, y = np.meshgrid(vals, vals)
  
  z = np.abs(np.sinc(x) * np.sinc(y))
  
  xDeg = np.rad2deg(x)
  yDeg = np.rad2deg(y)
  
  plt.pcolormesh(xDeg, yDeg, z, cmap = 'jet', vmin = 0, vmax = 1)
  plt.colorbar()
  
  plt.axis([-90, 90, -90, 90])
  ticks = np.linspace(-90, 90, 13)
  plt.xticks(ticks)
  plt.yticks(ticks)
  
  print np.mean(z)                # 0.186225110029
  print np.sqrt(np.mean(z**2))    # 0.295710882276
  plt.show()
  </code></pre>
  
  <p>It produces this image:
  <a href="https://i.stack.imgur.com/E9ZGa.png" rel="noreferrer"><img src="https://i.stack.imgur.com/E9ZGa.png" alt="pcolormesh result"></a></p>
  
  <p>I'd like to place:</p>
  
  <ol>
  <li>A marker on the colorbar at the mean (0.186).</li>
  <li>A horizontal line on the colorbar at the RMS value (0.295).</li>
  </ol>
  
  <p>Any input?</p>