当前位置:网站首页>matlab读取多张fig图然后合并为一张图(子图的形式)
matlab读取多张fig图然后合并为一张图(子图的形式)
2022-04-23 03:53: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://blog.csdn.net/subtitle_/article/details/124317501
边栏推荐
- Openvino only supports Intel CPUs of generation 6 and above
- Raspberry pie 3B logs into the wired end of Ruijie campus network through mentohust, creates WiFi (open hotspot) for other devices, and realizes self startup at the same time
- 【ICCV 2019】MAP-VAE:Multi-Angle Point Cloud-VAE: Unsupervised Feature Learning for 3D Point Clouds..
- Second kill all interval related problems
- Design and implementation of redis (4): what is the event driver of redis
- 基于PHP的代步工具购物商城
- (valid for personal testing) compilation guide of paddedetection on Jetson
- Let matlab2018b support the mex configuration of vs2019
- Nel ASA: her ø Ya facility in Norway officially opened
- Vscode download and installation + running C language
猜你喜欢
Writing latex with vscode - the latest tutorial 2022 / 4 / 17
Summary of knowledge map (3)
Cause analysis of incorrect time of AI traffic statistics of Dahua Equipment Development Bank
As a code farmer, what kind of experience is it that a girlfriend can code better than herself?
Design and implementation of redis (4): what is the event driver of redis
On the principle of concurrent programming and the art of notify / Park
Design and implementation of redis (1): understand data structures and objects
Digital image processing third edition Gonzalez notes Chapter 2
Installation and configuration of clion under win10
将编译安装的mysql加入PATH环境变量
随机推荐
What if you encounter symbols you don't know in mathematical formulas
Solve the technical problems in seq2seq + attention machine translation
Activity supports multi window display
Wechat applet canvas draws a simple asymptotic color of the dashboard
秒杀所有区间相关问题
The difference between lists, tuples, dictionaries and collections
The great gods in acmer like mathematics very much
On the principle of concurrent programming and the art of notify / Park
Zotero6. Version 0 quicklook cannot be used / Chinese garbled code will not be displayed
Vscode download and installation + running C language
ROS series (IV): ROS communication mechanism series (2): Service Communication
Download and configuration of idea
51 single chip microcomputer: D / a digital to analog conversion experiment
基于PHP的代步工具购物商城
中国移动日赚2.85亿很高?其实是5G难带来更多利润,那么钱去哪里了?
Abstract classes, interfaces and common keywords
Cause analysis of incorrect time of AI traffic statistics of Dahua Equipment Development Bank
vscode删除卸载残余
UDP protocol and TCP protocol
php导出Excel表格