Smooth image in matlab


In matlab, sometimes I prefer to plot a image for mesh data instead of surf and use view(2) (view(2) gives the top view of the surface plot). However,
imagesc(x,y,z) shading 'interp'
does not work. This problem can be solved by using:
pcolor(x,y,z) shading 'interp' set(gca,'TickDir','out')

.