当前位置:网站首页>matlab讀取多張fig圖然後合並為一張圖(子圖的形式)
matlab讀取多張fig圖然後合並為一張圖(子圖的形式)
2022-04-23 03:54:00 【subtitle_】
引言
多次做實驗得到了一些實驗的圖像,matlab導出保存為了fig格式,想讀取多張fig圖然後合成為一張大圖(子圖的形式),查了一些資料,記錄一些自己的思考和體會。

1.代碼
for i=1:10
%打開的fig文件酌情修改路徑
hf(i)=open(['.\fig\sin-x1-test_',num2str(i),'.fig']);%打開fig
fig(i)=get(hf(i), 'CurrentAxes');%獲取繪制的圖像
end
%新建一個圖窗
figure
for i=1:10
%看要繪制多少行多少列酌情改變
subplot(2,5,i);%第i個子圖
axChildren = get(fig(i),'Children');%獲取繪制的圖像
copyobj(axChildren, gca);%複制到當前圖窗裏
close(hf(i));%關掉已經複制的圖像
%下面是對圖片進行設置,請酌情修改
title(['S曲線第',num2str(i),'次測試']);%繪制子圖標題
xlabel('Angle(\circ)');%繪制子圖x標簽
ylabel('Center WaveLength Change(nm)');%繪制子圖y標簽
yaxis([-0.05,0.2])%繪制子圖y的範圍
xticks([0 20 40 60 80 100]);%繪制子圖刻度
end
2.最終效果如圖

版权声明
本文为[subtitle_]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230353257558.html
边栏推荐
- Let matlab2018b support the mex configuration of vs2019
- Nel ASA:挪威Herøya设施正式启用
- Jupiter notebook modify configuration file setting startup directory is invalid
- RuntimeError: output with shape [4, 1, 512, 512] doesn‘t match the broadcast shape[4, 4, 512, 512]
- Summary of knowledge map (I)
- vscode删除卸载残余
- ROS series (IV): ROS communication mechanism series (6): parameter server operation
- Numpy's broadcasting mechanism (with examples)
- Win10 boot VMware virtual machine boot seconds blue screen problem perfect solution
- Does China Mobile earn 285 million a day? In fact, 5g is difficult to bring more profits, so where is the money?
猜你喜欢

Retrieval question answering system baseline

OpenCV----YOLACT实例分割模型推理

Mechanical design knowledge point planning

創下國產手機在海外市場銷量最高紀錄的小米,重新關注國內市場

SQL learning record

Add the compiled and installed Mysql to the path environment variable

Qt程序集成EasyPlayer-RTSP流媒体播放器出现画面闪烁是什么原因?

The great gods in acmer like mathematics very much

On the principle of concurrent programming and the art of notify / Park

Openvino only supports Intel CPUs of generation 6 and above
随机推荐
[AI vision · quick review of robot papers today, issue 29] Mon, 14 Feb 2022
According to the category information and coordinate information of the XML file, the category area corresponding to the image is pulled out and stored in the folder.
SQL learning record
Leetcode punch in diary day 01
Qt程序集成EasyPlayer-RTSP流媒体播放器出现画面闪烁是什么原因?
php导出Excel表格
Installation and configuration of clion under win10
How Zotero quotes in word jump to references / hyperlink
SQL topic exercise summary
ROS series (IV): ROS communication mechanism series (5): Service Communication Practice
【NeurIPS 2019】Self-Supervised Deep Learning on Point Clouds by Reconstructing Space
VS Studio 修改C語言scanf等報錯
Let matlab2018b support the mex configuration of vs2019
Network principle | connection management mechanism in TCP / IP important protocol and core mechanism
Activity supports multi window display
What is software acceptance testing? What are the benefits of acceptance testing conducted by third-party software testing institutions?
Use of rotary selector wheelpicker
作为一名码农,女友比自己更能码是一种什么体验?
Design and implementation of redis (4): what is the event driver of redis
Summary of knowledge map (3)