My code doesn't work well when I apply a custom colormap. It does well with the default colormaps; however, when I specify my own it doesn't work.
My current code is this:
mymap = [
0.769, 0.992, 1.000; % 1 Sticky/water: Azul celeste
1.000, 0.976, 0.000; % 2 Sediments: Amarillo
1.000, 1.00, 1.00; % 3 Banda_1_superior de Upper_sup Carne claro
1, 1, 1; %BLANCO 4 No hace nada
0.443, 0.961, 0.525; % 5 MANTLE Olivine
0.000, 0.639, 1.000; % 6 ASTENOSPHERE: Azul fuerte
0.000, 0, 0; % 7 Frontera 1: Negro
1, 0.827, 0.596; % 8 Banda2_ de corteza sup Carne claro
0.502, 0.337, 0.122; % 9 Banda_2_crtx infe cafe Super fuerte
0.969, 0.733, 0.416; % 10 Banda_1 de corteza superior. Cafe un poco más fuerte
0.651, 0.514, 0.318; % 11 Banda_2_crtx infe Azul
1, 1, 1; % 12 Upper_2 Cafe_2
];
pcolor(mx,my,markcom);
clim([0.5 12.5]);
colormap(mymap);
shading interp;
axis tight;
xticks([0 100 200]);
yticks([0 50 100]);
xlabel('Distancia (km)', 'FontSize', 12, 'FontName', 'Arial')
ylabel('Profundidad (km)' , 'FontSize', 12, 'FontName', 'Arial')
%c = colorbar;
title(['Paso = ', num2str(ntimestep),' ', ' ',num2str(timesum*1e-6/(365.25*24*3600)), ' M.a.']);
hold on;
v1 = [473, 873, 1273, 1473];
v2 = v1-273;
[C,h] = contour(gridx/1000, gridy/1000, tk1-273, v2,'w', LabelSpacing=800, LineWidth=.9);
clabel(C, h, v2, 'Fontsize', 12, 'Color','white', 'FontName', 'Arial')
hold off;
axis ij image;
My output is this:

shading interp;withshading flat;do anything for you? Or do you need to useshading interp;?