Removing space between images in subplot

조회 수: 10 (최근 30일)
Ghulam
Ghulam 2018년 2월 15일
댓글: RAGHAVENDRA NAIK 2022년 5월 12일
Hi I am plotting multiple images on a figure using subplot. The problem is that there is an empty area present between images. I dont want this space to be there.
Can anyone please help me how to remove this unnecessary space between figures.
Regards

채택된 답변

Ghulam
Ghulam 2018년 2월 26일
| I found the solution of my problem, I am sharing with all of you here.
|
a = subplot(3,3,2); imshow('corn.png')
b = subplot(3,3,4); imshow('corn.png');
c = subplot(3,3,5); imshow('corn.png');
d = subplot(3,3,6); imshow('corn.png');
e = subplot(3,3,7); imshow('corn.png');
f = subplot(3,3,8); imshow('corn.png');
g = subplot(3,3,9); imshow('corn.png');
set(a, 'Position', [0.3 0.6 .3 .3]);
set(b, 'Position', [0 0.3 0.3 0.3]);
set(c,'Position',[0.3 0.3 0.3 0.3]);
set(d,'Position',[0.6 0.3 0.3 0.3]);
set(e,'Position',[0 0 0.3 0.3]);
set(f,'Position',[.3 0 .3 .3]);
set(g,'Position',[0.6 0 .3 .3]);
  댓글 수: 1
meghna roy chowdhury
meghna roy chowdhury 2021년 4월 18일
Hi, Can you tell me what the parameters of Position are?
i.e what does [0.3 0.6 0.3 0.3] represent?

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Ghulam
Ghulam 2018년 2월 26일
Can anyone please answer this?
  댓글 수: 1
RAGHAVENDRA NAIK
RAGHAVENDRA NAIK 2022년 5월 12일
[left margin,bottom margin,width,height]

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Subplots에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!