
[x,y] = ndgrid(1:10);
c = x+y;
c(5:6,5:6) = NaN; 

subplot(2,3,1);
pcolor(c); 
shading faceted
title('shading faceted with NaN in c');

subplot(2,3,2);
pcolor(c); 
shading flat
title('shading flat with NaN in c');

subplot(2,3,3);
pcolor(c); 
shading interp
title('shading interp with NaN in c');

c = x + y;
x(5:6,5:6) = NaN;

subplot(2,3,4);
pcolor(x,y,c); 
shading faceted
title('shading faceted with NaN in x');

subplot(2,3,5);
pcolor(x,y,c); 
shading flat
title('shading flat with NaN in x');

subplot(2,3,6);
pcolor(x,y,c); 
shading interp
title('shading interp with NaN in x');

if exist('OCTAVE_VERSION','builtin')
  print -dpng pcolor_octave.png
else
  print -dpng pcolor_matlab.png
end




