Matlab中一个figure函数画多个子图和多个figure函数画多个字图

此博文仅为个人学习笔记,仅供个人使用。

1.如何在一个figure里面画多个子图。

 %subplot(x,y,n)x表示显示的行数,y表示列数,n表示第几幅图片
figure,subplot(221),imhist(P),title('左部区域直方图');  % define figure                                                                             
subplot(222),imhist(U),title('左部区域直方图');  
subplot(223),imhist(D),title('中部区域直方图');
subplot(224),imhist(T),title('右部区域直方图');

在这里插入图片描述

%2行4列的图片,一共8幅图。
figure,subplot(241),imshow(P),title('左部区域原始图像');%321是3行2列矩阵第1幅图
subplot(242),imshow(L0),title('左部区域分割图像');
subplot(243),imshow(U),title('左部区域原始图像');%321是3行2列矩阵第1幅图
subplot(244),imshow(L1),title('左部区域分割图像');
subplot(245),imshow(D),title('中部区域原始图像');
subplot(246),imshow(L2),title('中部区域分割图像');
subplot(247),imshow(T),title('右部区域分割图像');
subplot(248),imshow(L3),title('右部区域分割图像');

在这里插入图片描述
2.多个figure画多个子图

figure(1);         % 第一个子图
plot(...);
figure(2);         % 第二个子图
plot(...);
figure(3);
plot(...);
figure(4);
plot(...);
  • 3
    点赞
  • 35
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值