MATLAB中 figure() 函数的用法详解 您所在的位置:网站首页 figure的属性 MATLAB中 figure() 函数的用法详解

MATLAB中 figure() 函数的用法详解

2023-08-09 08:19| 来源: 网络整理| 查看: 265

作者按:Matlab中的 figure() 函数主要用于建立图形窗口

用法一 默认参数

>>figure; %默认参数

用法二 和其他图窗函数配合使用,用于建立新窗口显示图形

>>figure,imhist(s); %配合使用于多窗口显示 %若不加figure, imhist()显示的图像会在figure1图窗中显示(覆盖imshow()的图像)

用法三 图形窗口属性及其参数(propertyname & propertyvalue)

>>figure('name','demo'); %图窗命名 >>figure('numbertitle','off'); %关闭图窗标题 >>figure('position', [left, bottom, width, height]); %设定图窗位置(默认以屏幕的左下角为原点)和大小 >>figure('menubar','none','toolbar','none'); %关闭菜单栏(munubar)和工具栏(toolbar) %多属性合并使用 >>figure('menubar','none','toolbar','none','numbertitle','off','position',[300,200,800,500]);

用法四 数字参数(数字是图形窗口的句柄标记)

>>figure(1); %图形窗口 1 figure(2); %图形窗口 2 %数字必须从1~2147483646的标量整数(参考matlab手册)

用法五 用于多图显示函数 subplot()之前,并结合 set()函数设定figure()的各项属性

>>wd = figure(1); set(wd, 'name','总图标题', 'numbertitle', 'off'); subplot(231), imshow(p),title('多图显示1');

个人经验,有不当指出还请评论指正。 更多用法参阅:https://ww2.mathworks.cn/help/matlab/ref/figure.html?searchHighlight=figure&s_tid=doc_srchtitle



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有