Hi,
The contour plot uses the current color map of the figure to decide the color pattern. A custom colormap can be used to plot a contour graph with a specific color pattern as shown:
cmap = [1 0 1; % magenta
0 1 1; % cyan
1 1 0; % yellow
0 0 0; % black
0 0 1; % blue
0 1 0; % green
1 0 0]; % red
data = rand(10);
data = (data - 0.5) * 225;
contourLevels = [-60 -30 -20 0 20 30 60];
figure();
contour(data, contourLevels, 'LineWidth', 2);
% Use the custom colormap
colormap(cmap);
colorbar()
set(gca, 'clim', [-60 60])