title: How to generate a non-linear colormap/colorbar?
body: <p>I would like to show a non-uniform colorbar as in the first picture. I have tried the code below. 'mycamp4' is a colormap manually saved. The result is shown as the second figure. The number <code>0.1</code> and <code>1.5</code> will be too closed too see. How can I make the colorbar like in the first picture?</p>
  
  <pre><code>v = [0.1 1 1.5 5 7.5 10 30];
  v_2 = [0.1 1.5 5 7.5 10 30];
  contourf(X,Y,pdf_normal',v);
  h = colorbar;
  load('MyColormaps','mycmap4');
  set(gcf,'Colormap',mycmap4);
  set(h, 'YTick', v_2)
  </code></pre>
  
  <p><strong>Picture 1:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/hC217.jpg" alt="enter image description here"></p>
  
  <p><strong>Picture 2:</strong> </p>
  
  <p><img src="https://i.stack.imgur.com/zQMnb.png" alt="enter image description here"></p>