title: Matplotlib custom diverging gradient ignoring colors
body: <p>I've been working on some data plotting functioning for python and one such tool I need for my research is a set of difference charts to compare the changes between two sets of data. </p>
  
  <p>I'm now at the point where I want to plot my data and I was looking into creating custom color maps to handle the diverging data, however all of my plots such far are either ignoring specific steps in my gradient, or the colors are being repeated for my low values.</p>
  
  <p>Here's an example plot that was generated:
  
  <a href="https://i.stack.imgur.com/ReBtd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ReBtd.png" alt="enter image description here"></a></p>
  
  <p>And the code for both my custom color map, as well as the plotting:</p>
  
  <pre><code>diffmap_17 = ["#FF0000", "#F81318", "#F12731", "#EB3B4A", "#EB5C66", "#EB7D82", "#EB9E9E", "#F1BEBE", "#F8DEDE", "#FFFFFF", "#DDDCFD", "#BCB9FB", "#9B96FA", "#6A6CFA", "#3A43FA", "#1D21FC", "#0000FF"]
  diffmap_17_colormap = matplotlib.colors.ListedColormap(diffmap_17)
  
  contour_levels = [-20, -10, -5, -2, -1, -0.75, -0.5, -0.25, -0.1, 0.0, 0.1, 0.25, 0.5, 0.75, 1, 2, 5, 10, 20]
  cs = m.contourf(x,y,data,contour_levels,cmap=diffmap_17_colormap) #plot total
  </code></pre>
  
  <p>My goal is to have the color map have the zero point be white, and then diverge outward (Reds negative, blues positive). For the time being, I'm employing a standard colormap, however using a custom one would be preferred moving forward.</p>
  
  <p>Any help would be greatly appreciated. Thanks!</p>