I'm trying to shade profiles of different measurements over depths and the colors look limited

3 vues (au cours des 30 derniers jours)
I am using contourf to plot data overdepth. The first panel looks fine, but in the second it looks like only four colors are being used for some reason. I cannot figure out why this is the case. The individual data are different so it isn't just the same number repeated. Can anyone help me explain this? I have copied my script (below) and attached the relevant data.
f3=figure(3)
ax(1) = subplot(2,1,1)
hold on
contourf(MX,mabs,fixPCO2(2:8,:),'LineStyle','none')
contour(MX,mabs,fixPCO2(2:8,:),[1000 1000],'w','linewidth',1)
hold off
shading('interp');
ylabel('mab','fontsize',16);
caxis([350 1000]);
b=colorbar; colormap(ax(2),jet)
title(b,'pCO2','fontsize',16);
set(gca,'fontsize',16);
x = datenum('July-30-2018'):1:datenum('Aug-13-2018');
set(gca, 'XTick', x);
datetick('x','mm/dd','keepticks')
%set(gca,'XTickLabel','');
ax(2) = subplot(2,1,2)
hold on
contourf(MX,mabs,fixOMEGA(2:8,:),'LineStyle','none')
contour(MX,mabs,fixOMEGA(2:8,:),[1 1],'w','linewidth',1)
hold off
shading('interp');
ylabel('mab','fontsize',16);
caxis([.76 2.2]);
colormap(ax(3),flipud(jet))
set(gca,'fontsize',16);
c=colorbar();
title(c,'\Omega_A_r','fontsize',16);
x = datenum('July-30-2018'):1:datenum('Aug-13-2018');
set(gca, 'XTick', x);
datetick('x','mm/dd','keepticks')
linkaxes(ax,'x')
  1 commentaire
Aghamarsh Varanasi
Aghamarsh Varanasi le 26 Mar 2020
Can you give more details on the variables used in this command
contourf(MX,mabs,fixPCO2(2:8,:),'LineStyle','none');

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Contour Plots dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by