title: Matlab how to make smooth contour plot?
body: <p>I want to represent data with 2 variables in 2D format. The value is represented by color and the 2 variables as the 2 axis. I am using the contourf function to plot my data:</p>
  
  <pre><code>clc; clear;
  
  load('dataM.mat')
  
  cMap=jet(256); %set the colomap using the "jet" scale
  F2=figure(1);
  [c,h]=contourf(xrow,ycol,BDmatrix,50);
  set(h, 'edgecolor','none');
  
  xlim([0.0352 0.3872]);
  ylim([0.0352 0.3872]);
  
  colormap(cMap);
  cb=colorbar;
  caxis([0.7 0.96]);
  % box on;
  hold on;
  </code></pre>
  
  <p>Both xrow and ycol are 6x6 matrices representing the coordinates. BDmatrix is the 6x6 matrix representing the corresponding data. However, what I get is this:</p>
  
  <p><a href="https://i.stack.imgur.com/e7tbH.png" rel="noreferrer"><img src="https://i.stack.imgur.com/e7tbH.png" alt="enter image description here"></a></p>
  
  <p>The following is the xrow and yrow matices:</p>
  
  <p><a href="https://i.stack.imgur.com/Nh7sG.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/Nh7sG.jpg" alt="enter image description here"></a></p>
  
  <p>The following is the BDmatrix matices:</p>
  
  <p><a href="https://i.stack.imgur.com/p5VP8.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/p5VP8.jpg" alt="enter image description here"></a></p>
  
  <p>Would it be possible for the contour color to vary smoothly rather than appearing as straight lines joining the data points? The problem of this figure is the coarse-granularity which is not appealing. I have tried to replace contourf with imagec but it seems not working. I am using MATLAB R2015b.</p>