title: Set Colorbar color in matplotlib
body: <p>I have the following code:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  from scipy import integrate, special
  import pylab
  def f(v,r):
      """ Initial function"""
      alpha = 0.2
      chi = 1/2*special.erf((r+1.2)/0.3)-1/2*special.erf((r-1.2)/0.3)
      return 4/(np.sqrt(2*np.pi*alpha))*chi*np.exp(-v**2/(2*alpha))
  
  
  N_xi = 100
  
  v = (np.arange(N_xi)*4/(N_xi - 1)-2)
  r = (np.arange(N_xi)*4/(N_xi - 1)-2)
  z = f(v.reshape(-1, 1), r.reshape(1, -1))
  
  pylab.pcolor(v, r, z)
  
  pylab.colorbar()
  
  pylab.show() 
  </code></pre>
  
  <p>And I got the figure:<a href="https://i.stack.imgur.com/byPCJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/byPCJ.png" alt="enter image description here"></a>
  But I want to change the color of it, to get the figure like this<a href="https://i.stack.imgur.com/SxBCR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SxBCR.png" alt="enter image description here"></a>
  How can I set the color?</p>