title: Custom Colormap in Python
body: <p>I would like to create my own custom colour map in python, I looked into some of the online examples and found out the commands </p>
  
  <pre><code>from matplotlib import cm 
  import matplotlib.pyplot as plt 
  from matplotlib.colors import LinearSegmentedColormap
  
  cdict1 = {'red':   ((0.0, 0.0, 0.0),
                      (0.5, 0.0, 0.1),
                      (1.0, 1.0, 1.0)),
  
           'green': ((0.0, 0.0, 0.0),
                     (1.0, 0.0, 0.0)),
  
           'blue':  ((0.0, 0.0, 1.0),
                     (0.5, 0.1, 0.0),
                     (1.0, 0.0, 0.0))
           }
  
  blue_red1 = LinearSegmentedColormap('BlueRed1', cdict1)
  plt.imshow(big,interpolation='nearest',  cmap=blue_red1, aspect='auto')
  plt.colorbar()
  plt.show()
  </code></pre>
  
  <p>With the above command I get a colour map which is (Red - Black - Blue), Where red being maximum and blue being minimum.  I would like to create a colour map which is (Black - White - Black). Could someone tell me what should be done or any other method ? </p>