Matlab contour plot smooth colors

11,883

Solution 1

You can use imagesc with the 'jet' colormap. Here's an example:

x = conv2( randn(600), fspecial('gaussian',200,20), 'valid'); %// example 2D smooth data
imagesc(x)
colormap(jet)
colorbar
grid

enter image description here

Solution 2

That is not a contour plot!

try imagesc, surf and all of their variants:

http://uk.mathworks.com/help/matlab/surface-and-mesh-plots-1.html http://uk.mathworks.com/help/matlab/image-file-operations.html

Share:
11,883

Related videos on Youtube

pb.
Author by

pb.

Updated on June 04, 2022

Comments

  • pb.
    pb. almost 2 years

    Could you tell me how to plot in Matlab figure such as below (smooth transition of colors)? Function countour allows only to create plot with contour lines which doesn't provide enough information to me.

    http://www.advsofteng.com/images/smoothcontour.jpg