title: customize colors in color bar MATLAB
body: <p>I have searched a lot but I can not find my answer.I am new to matlab.</p>
  
  <p>I want to show specific colors in color bar based on the values [0 1 2 3 4 5 10 15], in other words I want to reserve colors for these values...for example yellow color between 0 and 1, orange color between 1 and 2, red color between 2 and 3 and so on...I have used code below but It is not the right answer..the main data can be between 0 and 2 , 0 and 10, or 0 and 15..I want to have exactly a specific color for values between 0 and 1 in all of my figures...I have used contourf function. 
  here is my code:</p>
  
  <pre><code>points = [ 1 1 1 1; 2 2 2 2 ];
  &gt; 
  &gt; depths = [ 10 5 1 0.5; 10 5 1 0.5];
  &gt; 
  &gt; RFU27 = [1.46 0.32 0.26 0.26; 1.46 0.32 0.26 0.26];
  &gt; 
  &gt; contourf(points,depths,RFU27)
  &gt; 
  &gt; % Design the Plot 
    set(gca, 'XTick', points(1) : points(2),'XTickLabel',{ 'LSB1' , 'LSB2'});
  &gt; 
  &gt; ylabel('Depth(m)') xlabel('Points') title('Date: 27.08.2013')
  &gt; 
  &gt; set(get(colorbar('YTickLabel',...
  &gt;     {'0','1','2','3',...
  &gt;     '4','5','10','15'}),'ylabel'),'String','BGA PC(RFU)');
  
  set(gca,'ydir','rev')
  </code></pre>
  
  <p>and here are some of the real data which I must use in contourf</p>
  
  <pre><code>RFU27 = [1.46 0.32 0.26 0.26; 1.46 0.32 0.26 0.26];
  
  RFULast = [2.460869565, 0.539285714, 0.458208955, 0.566666667, 0; 0, 0, 0, 0, 14.27300469];
  </code></pre>
  
  <p>Please Help me, Thanks.   </p>