日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Matlab 科研绘图汇总

發布時間:2024/3/13 编程问答 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Matlab 科研绘图汇总 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

?條形圖

%% 繪制條形圖 figure x=1:3; y=indicator_ztd_all; h=bar(x,y); ylabel('Accurasy(mm)'); xlabel('Map Function'); set(gca,'XTickLabel',type); %type=[string('GMF'),string('NMF'),string('VMF1')]; ylim([-2 10]) %y軸范圍%柱形圖數字注記 for i=1:length(x) text(x(i)+0.1,-1.3,num2str(y(i,1),'%.2f'),'HorizontalAlignment','center','VerticalAlignment','bottom') text(x(i)-0.05,y(i,2)+0.1,num2str(y(i,2),'%.2f'),'HorizontalAlignment','center','VerticalAlignment','bottom') text(x(i)+0.25,y(i,3)+0.1,num2str(y(i,3),'%.2f'),'HorizontalAlignment','center','VerticalAlignment','bottom') end %設置figure圖像大小 set(gcf,'unit','centimeters','position',[6,4,12,6.18]) %設置圖例 lgd=legend('bias','std','rms'); %設置圖例大小和位置set(lgd,'unit','centimeters','position',[7.85,3,0.5,0.5]);

?

折線圖

%繪制折線圖plot(ztdSeris{1,1}(:,1),ztdSeris{1,1}(:,2),'LineWidth',1)hold onplot(ztdSeris{2,1}(:,1),ztdSeris{2,1}(:,2),'LineWidth',1)hold onplot(ztdSeris{3,1}(:,1),ztdSeris{3,1}(:,2),'LineWidth',1)set(gca,'FontSize',10);xlabel('Doy');ylabel('Ztd Bias(mm)');xlim([143 150]) %x軸范圍grid on;set(gcf,'unit','centimeters','position',[6,4,8,4.944]) lgd=legend('GMF','NMF','VMF1');set(lgd,'unit','centimeters','position',[5.5,3.7,0.5,0.5],'FontSize',8);% set(lgd,'Orientation','horizon'); 橫排picff=sprintf('%s%s_map',savedir,list{i,1})print(gcf,picff,'-r300','-dtiff');

?線性擬合相關系數圖

GNSS_PWV=diff(:,4); Radio_PWV=diff(:,5); rms=sqrt(sumsqr(diff(:,6))/(length(diff(:,6)))); %相關系數 corrArray=corrcoef(GNSS_PWV,Radio_PWV); corr=corrArray(1,2);%繪制線性擬合圖 t=polyfit(GNSS_PWV,Radio_PWV,1); plot(GNSS_PWV,Radio_PWV,'.',GNSS_PWV,polyval(t,GNSS_PWV),'MarkerSize',24,'LineWidth',3) % Label axes xlabel('GNSS/PWV (mm)'); ylabel('Radio/PWV (mm)'); set(gca, 'FontName','times new roman','FontSize',10) ; set(gcf,'unit','centimeters','position',[6,4,14,7]) %繪制文字框 RMS='RMS:'; RMS=[RMS,num2str(roundn(rms,-2)),' mm']; Correlation='Correlation:'; Correlation=[Correlation,num2str(roundn(corr,-4))]; strings={RMS;Correlation}; annotation( ...'textbox',[0.15,0.75,0.25,0.15],...'String',strings,...'LineWidth',1,...'FontSize',10,...'FontName','times new roman',...'FitBoxToText','off'); grid on %限制x軸范圍 min=min(GNSS_PWV); max=max(GNSS_PWV); xlim([min max]); picfn=sprintf('seris_%d%3.3d_%d%3.3d%',sy,sdoy,ey,edoy); picff=fullfile(workDir,picfn); print(gcf,picff,'-r300','-dpng'); close(gcf)

?

總結

以上是生活随笔為你收集整理的Matlab 科研绘图汇总的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。