title: Rotation of colorbar tick labels in matplotlib
body: <p>I would like to rotate the colorbar tick labels so that they read vertically rather than horizontally. I have tried as many variations as I can think of with <code>cbar.ax.set_xticklabels</code> and <code>cbar.ax.ticklabel_format</code> and so on with <code>rotation='vertical'</code> but haven't quite landed it yet.</p>
  
  <p>I've provided a MWE below:</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  
  #example function
  x,y = np.meshgrid(np.linspace(-10,10,200),np.linspace(-10,10,200))
  z = x*y*np.exp(-(x+y)**2)
  
  #array for contourf levels
  clevs = np.linspace(z.min(),z.max(),50)
  
  #array for colorbar tick labels
  clevs1 =np.arange(-200,100,10)
  
  cs1 = plt.contourf(x,y,z,clevs)
  
  cbar = plt.colorbar(cs1, orientation="horizontal")
  cbar.set_ticks(clevs1[::1])
  
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/2jRuT.png" rel="noreferrer"><img src="https://i.stack.imgur.com/2jRuT.png" alt="Example Image"></a></p>
  
  <p>Any pointers would be greatly appreciated - I'm sure this must be pretty simple...</p>