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

조회 수: 3 (최근 30일)
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')

답변 (0개)

카테고리

Help CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by