当前位置:网站首页>MATLAB---坐标轴多图片显示
MATLAB---坐标轴多图片显示
2022-04-21 10:56:00 【小宇2022】
%前提:3张待显示图片在该脚本所在目录下
%功能:将3张图片显示到同一个坐标轴内
%版本:V1.0
%创建窗口
hFig = figure('Name','坐标轴多图片显示BY小宇V1.0',...
'NumberTitle','off',...
'Resize','off',...
'Position',[0 0 800 400],...
'ToolBar', 'none',...
'visible', 'off');
%将窗口移到屏幕中间
movegui(hFig, 'center');
%创建坐标轴,注意Y轴方向要反过来
hAxes = axes('Units','Normalized',...
'Position',[0.05 0.05 .9 .9],...
'NextPlot','add',...
'Box','on',...
'YDir', 'reverse');
%读取3张图片
if exist('pic001.jpg', 'file') ~= 2
errordlg('图片pic001.jpg不存在!');
return;
end
if exist('pic002.jpg', 'file') ~= 2
errordlg('图片pic002.jpg不存在!');
return;
end
if exist('pic003.jpg', 'file') ~= 2
errordlg('图片pic003.jpg不存在!');
return;
end
h1 = imread('pic001.jpg');
h2 = imread('pic002.jpg');
h3 = imread('pic003.jpg');
%将3张图片依次显示到坐标轴hAxes
image([0 290],[0 390], h1);
image([290 580],[0 390], h2);
image([580 870],[0 390], h3);
%设置坐标轴的坐标范围
set(hAxes,'Xlim',[0 870],...
'Ylim',[0 390],...
'XTickLabel', '',...
'YTickLabel', '',...
'XTick', [],...
'YTick', []);
%处理完成后,显示该窗口
set(hFig, 'visible', 'on');

版权声明
本文为[小宇2022]所创,转载请带上原文链接,感谢
https://blog.csdn.net/m0_38127487/article/details/124311996
边栏推荐
- [TIANTI race] l3-005 dustbin distribution (heap optimized version Dijkstra)
- 以用户体验五要素的思路,如何编写产品需求文档(PRD)
- 【天梯赛】L3-005 垃圾箱分布(堆优化版dijkstra)
- Go language reflection mechanism
- Println input and rewriting of toString method
- O2oa secondary development - use the open source platform to build a complete OA (3) - development enterprise reimbursement approval
- Postman setting environment variables is simple and practical
- 后缀数组模版代码解析
- 后缀数组
- 后缀数组应用
猜你喜欢

AcWing 1761. Block billboard (computational geometry, intersection of two rectangles)

从思维转变看数字化转型 IT 经营

活动报名 | 如何基于开源项目 Tapdata PDK,快速完成数据源和目标的开发?

8-channel can FD, more powerful data recorder gl3400
Go环境的搭建

【面试普通人VS高手系列】b树和b+树的理解

TypeError: The view function did not return a valid response. The function either returned none

Teach you by hand: rolling bearing fault diagnosis based on deep learning

实践六 Windows操作系统安全攻防

How to write product requirements document (PRD) with the idea of five elements of user experience
随机推荐
第一个GO程序
AcWing 1725. 组队井字游戏(枚举)
NFT中的版权漏洞:产品设计需考虑法律层面
Map与JsonObject区别
Tamigou enterprise M & a platform, list of legal service providers!
GO语言反射机制
MATLAB GUI应用---摇奖(动画演示)
JS implementation top input text box
TypeError: The view function did not return a valid response. The function either returned None 的解决
Modern Actuarial Risk Theory 07: risk measurement
【面试普通人VS高手系列】b树和b+树的理解
RMQ&线段树复习
MATLAB GUI--ScrollBar(动画演示)
PHP文件包含:require,require_once;include,include_once
Android learning ① various reasons why Android cannot connect to MySQL database and Solutions
println输入和toString方法的重写
【acwing】1459. 奶牛体操(模拟、思维)
AcWing 1749. Block billboard II (classified discussion + enumeration)
Tgpimage in GDI + loads images from streams
Convbert: improving Bert with span based dynamic revolution