当前位置:网站首页>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
边栏推荐
- CRF based medical entity recognition baseline
- Nel ASA:挪威Herøya设施正式启用
- Summary of knowledge map (I)
- Xshell、Xftp连接新创建的Unbutu系统虚拟机全流程
- 列表、元组、字典和集合的区别
- Design and implementation of redis (4): what is the event driver of redis
- Leetcode punch in diary day 01
- UDP协议与TCP协议
- MySQL is completely uninstalled and MySQL service is cleaned up
- [latex] differences in the way scores are written
猜你喜欢

知乎有问题,谁来解答?

(valid for personal testing) compilation guide of paddedetection on Jetson

Add the compiled and installed Mysql to the path environment variable

The art of concurrent programming (3): an in-depth understanding of the principle of synchronized

What if you encounter symbols you don't know in mathematical formulas

变量、常量、运算符

Set经典小题目

秒杀所有区间相关问题
![[AI vision · quick review of NLP natural language processing papers today, issue 28] wed, 1 Dec 2021](/img/e1/ffa8c06b0856e16236b4c5ded882d7.png)
[AI vision · quick review of NLP natural language processing papers today, issue 28] wed, 1 Dec 2021

Design and implementation of redis (3): persistence strategy RDB, AOF
随机推荐
(valid for personal testing) compilation guide of paddedetection on Jetson
一个函数秒杀2Sum 3Sum 4Sum问题
现货黄金基本介绍
[Li Hongyi 2022 machine learning spring] hw6_ Gan (don't understand...)
Qt程序集成EasyPlayer-RTSP流媒体播放器出现画面闪烁是什么原因?
作为一名码农,女友比自己更能码是一种什么体验?
Design and implementation of redis (5): master-slave replication strategy and optimization
Cause analysis of incorrect time of AI traffic statistics of Dahua Equipment Development Bank
Xiaomi, which has set the highest sales record of domestic mobile phones in overseas markets, paid renewed attention to the domestic market
Detailed explanation on the use of annotation tool via (VGg image annotator) in mask RCNN
標識符、關鍵字、數據類型
Definition, understanding and calculation of significant figures in numerical analysis
Design and implementation of redis (1): understand data structures and objects
Set经典小题目
php导出Excel表格
Overview of knowledge map (II)
Vscode download and installation + running C language
ROS series (V): common commands in ROS
Cmake qmake simple knowledge
Paddlepaddle model to onnx