当前位置:网站首页>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
边栏推荐
- Digital image processing third edition Gonzalez notes Chapter 2
- Operating skills of spot gold_ Wave estimation curve
- Design and implementation of redis (6): how redis achieves high availability
- Let matlab2018b support the mex configuration of vs2019
- Definition, understanding and calculation of significant figures in numerical analysis
- SQL learning record
- What if you encounter symbols you don't know in mathematical formulas
- Basic usage of Google colab (I)
- [mathematical modeling] my mathematical memory
- Install PaddlePaddle on ARM
猜你喜欢
VSCode配置之Matlab极简配置
Qt程序集成EasyPlayer-RTSP流媒体播放器出现画面闪烁是什么原因?
[latex] differences in the way scores are written
常用的辅助类
Notes sur l'apprentissage profond (Ⅱ) - - Principe et mise en oeuvre de la fonction d'activation
[AI vision · quick review of NLP natural language processing papers today, issue 30] Thu, 14 APR 2022
Set经典小题目
Design and implementation of redis (4): what is the event driver of redis
Detailed explanation on the use of annotation tool via (VGg image annotator) in mask RCNN
Retrieval question answering system baseline
随机推荐
On the principle of concurrent programming and the art of notify / Park
MySQL zip installation tutorial
Digital image processing third edition Gonzalez notes Chapter 2
【NeurIPS 2019】Self-Supervised Deep Learning on Point Clouds by Reconstructing Space
The art of concurrent programming (5): the use of reentrantlock
【测绘程序设计】坐标方位角推算神器(C#版)
UDP协议与TCP协议
基于PHP的代步工具购物商城
PolarMask is not in the models registry
Using VBA interval to extract one column from another in Excel
Identifier, keyword, data type
Nel ASA: her ø Ya facility in Norway officially opened
Mechanical design knowledge point planning
使用大华设备开发行AI人流量统计出现时间不正确的原因分析
硬核拆芯片
Nel ASA:挪威Herøya设施正式启用
A sword is a sword. There is no difference between a wooden sword and a copper sword
Leetcode punch in diary day 01
【ICCV 2019】MAP-VAE:Multi-Angle Point Cloud-VAE: Unsupervised Feature Learning for 3D Point Clouds..
[AI vision · quick review of robot papers today, issue 28] wed, 1 Dec 2021