| Using MATLAB Graphics | Search  Help Desk |
contourf displays a two-dimensional contour plot and fills the areas between contour lines. Use caxis to control the mapping of contour to color. For example, this filled contour plot of the peaks data uses caxis to map the fill colors into the center of the colormap.
Z = peaks;
[C,h] = contourf(Z,10);
caxis([-20 20])
title({'Filled Contour Plot Using','contourf(Z,10)'})