matlab(figure和subplot)title text figure标题的使用技巧
来源:互联网 发布:linux手动关机命令 编辑:程序博客网 时间:2024/05/16 09:37
1、修改figure标题
h=figure(1);
set(h,'name','your text','Numbertitle','off');
2、text用法
text(10,10,'your text');% 前面两个位置坐标
如果要在text中输入变量,那么
text(10,10,sprintf('这是第%d幅图像(变量i);\n程序运行时间(变量time):%2.2f秒;\n占用百分比:%d%%(变量p);',i,time,p*100));
3、figure区别于子图(subplot)之外的title
第①种方法 :
fig = figure;
a(1) = subplot(2,2,1);
p(1) = plot(rand(10,1));title('1');
a(2) = subplot(2,2,2);
p(2) = plot(rand(10,1));title('2');
a(3) = subplot(2,2,3);
p(3) = plot(rand(10,1));title('3');
a(4) = subplot(2,2,4);
p(4) = plot(rand(10,1));title('4');
ax = axes('position',[0,0,1,1],'visible','off');
tx = text(0.4,0.95,'第一种方法');
set(tx,'fontweight','bold');
第②种方法:
subplot(122);% 在子图后面添加以下内容
ax = axes('position',[0,0,1,1],'visible','off');
tx = text(0.18,0.05,'第二种方法');
set(tx,'fontweight','bold');
第③种方法:
figure;uicontrol('Style','text','String', '第三种方法','Units','normalized','Position', [0.5 0.2 0.1 0.1]);% 修改text句柄
或者
subplot(122);% 在子图后面添加以下内容
ah=gca;axes('position',[0,0,1,1],'visible','off');text(.5,.25,'第三种方法'');axes(ah);
3、gtext用法不多叙述,很简单
figure;gtext('你的文本');% 可以自己选择将文本放在何处
h=figure(1);
set(h,'name','your text','Numbertitle','off');
2、text用法
text(10,10,'your text');% 前面两个位置坐标
如果要在text中输入变量,那么
text(10,10,sprintf('这是第%d幅图像(变量i);\n程序运行时间(变量time):%2.2f秒;\n占用百分比:%d%%(变量p);',i,time,p*100));
3、figure区别于子图(subplot)之外的title
第①种方法 :
fig = figure;
a(1) = subplot(2,2,1);
p(1) = plot(rand(10,1));title('1');
a(2) = subplot(2,2,2);
p(2) = plot(rand(10,1));title('2');
a(3) = subplot(2,2,3);
p(3) = plot(rand(10,1));title('3');
a(4) = subplot(2,2,4);
p(4) = plot(rand(10,1));title('4');
ax = axes('position',[0,0,1,1],'visible','off');
tx = text(0.4,0.95,'第一种方法');
set(tx,'fontweight','bold');
第②种方法:
subplot(122);% 在子图后面添加以下内容
ax = axes('position',[0,0,1,1],'visible','off');
tx = text(0.18,0.05,'第二种方法');
set(tx,'fontweight','bold');
第③种方法:
figure;uicontrol('Style','text','String', '第三种方法','Units','normalized','Position', [0.5 0.2 0.1 0.1]);% 修改text句柄
或者
subplot(122);% 在子图后面添加以下内容
ah=gca;axes('position',[0,0,1,1],'visible','off');text(.5,.25,'第三种方法'');axes(ah);
3、gtext用法不多叙述,很简单
figure;gtext('你的文本');% 可以自己选择将文本放在何处
1 0
- matlab(figure和subplot)title text figure标题的使用技巧
- matlab(figure和subplot)title text figure标题的使用技巧
- 【转】matlab标题,给figure加标题,subplot的部分用法
- matlab中hold指令、figure指令及subplot指令的使用
- Matlab中给figure添加图例(legend),标题(title)和颜色(color)
- matlab-figure&plot使用
- MATLAB“figure”使用详解!
- matlab figure的用法
- Matlab: figure的用法
- Matlab: figure的用法
- matlab中figure的坐标轴label、title、xticklabel的旋转
- matlab中figure的坐标轴label、title、xticklabel的旋转
- matlab中figure有多个图时,设定总标题的方法
- MATLAB中figure转pdf中文乱码的小技巧
- 给figure加上title
- 11.9 Matlab 中Figure的创建和设置
- 【Matlab】关于axes和figure对象的关系
- MATLAB----改变figure大小和字号
- 2016南京师范大学英美文学考研初试真题回忆
- 前端知识体系
- COCOA国际化
- 设计模式——单例模式
- java读取邮箱
- matlab(figure和subplot)title text figure标题的使用技巧
- 阿里云ECS Winows系统服务器解决web服务80端口监听异常
- UGUI中背景分辨率适应
- 解决:Invalid escape sequence (valid ones are \b \t \n \f \r \” \’ \\ )
- 解决一台机器同时运行多个Tomcat服务
- 整理--感知机知识点
- window下erlang(18.3)与rabbitmq(3.6.1)安装
- java的接口和抽象类
- Tomcat Weblogic JMS 启动无法加载weblogic.jar classnotFouncException