matlab脚本
% load('C:\Users\yutian\Desktop\table25.mat','a13_11ori','a14_03ori')
% load('C:\Users\yutian\Desktop\finaltry.mat','L1','L2')
% plot figure 3
hp=figure;
set(hp,'position',[100 100 700 800],'color','w')
pos1 = [0.1 0.83 0.8 0.14];
subplot('Position',pos1)
plot(a13_11ori,'k-','LineWidth',1.5);
box off
xlim([0 721])
ylim([0 450])
set(gca,'ytick',[0 200 450])
set(gca,'yticklabel',{'0','200','450'},'fontsize',10)
set(gca,'xtick',linspace(0,720,31)+1)
set(gca,'xticklabel',[])
set(gca,'ticklength',[0.003 0.003]);%style 6 刻度长度
set(gca,'tickdir','out');
ylabel('PM2.5/\mug·m^{-3}','fontsize',10);% ,'fontsize',12,'position',[-0.13 0.18]
text(30,450*0.86,'(a)2013','fontsize',10)
pos2 = [0.1 0.68 0.8 0.14];
subplot('Position',pos2)
[~,h1] =contourf(L1(1:2880,10:134,1)',200); % contourf(peaks(20),10);或者contourf(x,y,z,'LineStyle','none')
set(h1,'LineColor','none')
box off
colormap('jet')
caxis([0 3])
set(gca,'ytick',[25 58 91 124])
set(gca,'yticklabel',{'1','2','3','4'},'fontsize',10)
set(gca,'xtick',linspace(0,2880,31)+1) %31个数
set(gca,'ticklength',[0.003 0.003]);%style 6 刻度长度
set(gca,'tickdir','out');
set(gca,'xticklabel',[])
ylabel('高度/km','fontsize',10)
pos3 = [0.1 0.53 0.8 0.14];
subplot('Position',pos3)
[~,h2] =contourf(L2(1:2880,10:134,1)',200); % contourf(peaks(20),10);或者contourf(x,y,z,'LineStyle','none')
set(h2,'LineColor','none')
box off
colormap('jet')
caxis([0 3])
set(gca,'ytick',[25 58 91 124])
set(gca,'yticklabel',{'1','2','3','4'},'fontsize',10)
set(gca,'xtick',linspace(0,2880,31)+1) %31个数
set(gca,'xticklabel',num2cell(linspace(1,31,31)))
set(gca,'ticklength',[0.003 0.003]);%style 6 刻度长度
set(gca,'tickdir','out');
ylabel('高度/km','fontsize',10)
hc1=colorbar('Position',[0.91 0.53 0.01 0.29]);
set(get(hc1,'title'),'string','km^{-1}','fontname','kaiti','fontsize',12)
pos4 = [0.1 0.35 0.8 0.14];
subplot('Position',pos4)
plot(a14_03ori,'k-','LineWidth',1.5)
box off
xlim([0 745])
ylim([0 450])
set(gca,'xtick',linspace(0,744,32)+1)
set(gca,'xticklabel',[])
set(gca,'ytick',[0 200 450])
set(gca,'yticklabel',{'0','200','450'},'fontsize',10)
set(gca,'ticklength',[0.003 0.003]);%style 6 刻度长度
set(gca,'tickdir','out');
ylabel('PM2.5/\mug·m^{-3}','fontsize',10)
text(30,450*0.86,'(b)2014','fontsize',10)
pos5 = [0.1 0.20 0.8 0.14];
subplot('Position',pos5)
[~,h1] =contourf(L1(:,10:134,2)',200); % contourf(peaks(20),10);或者contourf(x,y,z,'LineStyle','none')
set(h1,'LineColor','none')
box off
colormap('jet')
caxis([0 3])
set(gca,'ytick',[25 58 91 124])
set(gca,'yticklabel',{'1','2','3','4'},'fontsize',10)
set(gca,'xtick',linspace(0,2976,32)+1) %31个数
set(gca,'xticklabel',[])
set(gca,'ticklength',[0.003 0.003]);%style 6 刻度长度
set(gca,'tickdir','out');
ylabel('高度/km','fontsize',10)
pos6 = [0.1 0.05 0.8 0.14];
subplot('Position',pos6)
[~,h2] =contourf(L2(:,10:134,2)',200); % contourf(peaks(20),10);或者contourf(x,y,z,'LineStyle','none')
set(h2,'LineColor','none')
box off
colormap('jet')
caxis([0 3])
set(gca,'ytick',[25 58 91 124])
set(gca,'yticklabel',{'1','2','3','4'},'fontsize',10)
set(gca,'xtick',linspace(0,2976,32)+1) %31个数
set(gca,'xticklabel',num2cell(linspace(1,31,31)),'fontsize',10)
set(gca,'ticklength',[0.003 0.003]);%style 6 刻度长度
set(gca,'tickdir','out');
ylabel('高度/km','fontsize',10)
hc=colorbar('Position',[0.91 0.05 0.01 0.29]);
set(get(hc,'title'),'string','km^{-1}','fontname','kaiti','fontsize',12)
% saveas(gcf,['E:\激光雷达\plot_final\','雷达填色图','.tiff']);
set(gcf,'PaperPositionMode','auto') % Use screen size
print -depsc -r600 myfigure
网友评论