title: Automatic construction of a colormap around the value zero
body: <p>I often want to plot a difference image that ranges from some negative number to some positive one.  The issue with that is that matlab's colormaps scale only from the min value to the max value but do not care about some middle value (this case zero). For example, I have produced the <code>peaks</code> image with a single pixel different:</p>
  
  <p><img src="https://i.stack.imgur.com/ORyuy.png" alt="enter image description here"></p>
  
  <p>where the original  looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/413Tw.png" alt="enter image description here"></p>
  
  <p>So zero values are blue at the  top image and green at the bottom... (using jet colormap as an example)</p>
  
  <p>I'd like to built a colormap that will automatically represent zero values as the same color no matter what will be the min\max values.  How can I do that?</p>