필터 지우기
필터 지우기

Merging multiple subplots into a mosaic

조회 수: 6 (최근 30일)
Marin
Marin 2012년 7월 9일
I would like to make a subplot but in a way that there is not so much space between the plots. It should look like It should look something like this so that the axis labels and scales are only on the left and on the bottom and not on every plot separately and that all the plots are separated only by their axis.
I read the help on the subplot function but there is no mention of anything that would help me with this.
Thank you very much in advance!
  댓글 수: 2
Jan
Jan 2012년 7월 9일
Your link is dead.
Thomas
Thomas 2012년 7월 9일
@Jan - link works for me.. Possibly our network connection issues cropping up again.. :)

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

채택된 답변

Jan
Jan 2012년 7월 9일
편집: Jan 2012년 7월 9일
  댓글 수: 2
Marin
Marin 2012년 7월 9일
I didn't know about this, thanks! I'm checking it now :)
Marin
Marin 2012년 7월 10일
Thanks, this third one seems best for the problem I described.

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

추가 답변 (1개)

Thomas
Thomas 2012년 7월 9일
편집: Thomas 2012년 7월 9일
Something like this: just change the plot command with what you wan to plot..
% Create subplot
subplot1 = subplot(4,4,1,'XTickLabel',{'','','',''});
box(subplot1,'on');
hold(subplot1,'all')
% Create plot
plot(rand(4,1));
% Create subplot
subplot2 = subplot(4,4,2,'XTickLabel',{'','','',''},'YTickLabel',{'','',''});
box(subplot2,'on');
hold(subplot2,'all');
plot(rand(4,1));
% Create subplot
subplot3 = subplot(4,4,3,'XTickLabel',{'','','',''},'YTickLabel',{'','',''});
box(subplot3,'on');
hold(subplot3,'all');
% Create plot
plot(rand(4,1));
% Create subplot
subplot4 = subplot(4,4,4,'XTickLabel',{'','','',''},'YTickLabel',{'','',''});
box(subplot4,'on');
hold(subplot4,'all');
% Create plot
plot(rand(4,1));
% Create subplot
subplot5 = subplot(4,4,5,'XTickLabel',{'','','',''});
box(subplot5,'on');
hold(subplot5,'all');
% Create plot
plot(rand(4,1));
% Create subplot
subplot6 = subplot(4,4,6,'XTickLabel',{'','','',''},'YTickLabel',{'','',''});
box(subplot6,'on');
hold(subplot6,'all');
% Create plot
plot(rand(4,1));
% Create subplot
subplot7 = subplot(4,4,7,'XTickLabel',{'','','',''},'YTickLabel',{'','',''});
box(subplot7,'on');
hold(subplot7,'all');
% Create plot
plot(rand(4,1));
subplot8 = subplot(4,4,8,'XTickLabel',{'','','',''},'YTickLabel',{'','',''});
box(subplot8,'on');
hold(subplot8,'all');
% Create plot
plot(rand(4,1));
% Create subplot
subplot9 = subplot(4,4,9,'XTickLabel',{'','','',''});
box(subplot9,'on');
hold(subplot9,'all');
% Create plot
plot(rand(4,1));
% Create subplot
subplot10 = subplot(4,4,10,'XTickLabel',{'','','',''},'YTickLabel',{'','',''});
box(subplot10,'on');
hold(subplot10,'all');
% Create plot
plot(rand(4,1));
% Create subplot
subplot11 = subplot(4,4,11,'XTickLabel',{'','','',''},'YTickLabel',{'','',''});
box(subplot11,'on');
hold(subplot11,'all');
% Create plot
% Create plot
plot(rand(4,1));
% Create subplot
subplot12 = subplot(4,4,12,'XTickLabel',{'','','',''},'YTickLabel',{'','',''});
box(subplot12,'on');
hold(subplot12,'all');
% Create plot
plot(rand(4,1));
% Create subplot
subplot13 = subplot(4,4,13);
box(subplot13,'on');
hold(subplot13,'all');
% Create plot
plot(rand(4,1));
% Create subplot
subplot14 = subplot(4,4,14,'YTickLabel',{'','',''});
box(subplot14,'on');
hold(subplot14,'all');
% Create plot
plot(rand(4,1));
% Create subplot
subplot15 = subplot(4,4,15,'YTickLabel',{'','',''});
box(subplot15,'on');
hold(subplot15,'all');
% Create plot
plot(rand(4,1));
% Create subplot
subplot16 = subplot(4,4,16,'YTickLabel',{'','',''});
box(subplot16,'on');
hold(subplot16,'all');
% Create plot
plot(rand(4,1));
  댓글 수: 2
Marin
Marin 2012년 7월 9일
This is very nice, thank you. Is there a way to decrease the amount of space between the plots?
Thomas
Thomas 2012년 7월 9일
As mentioned by Jan the following should help:

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by