Merging multiple subplots into a mosaic
조회 수: 6 (최근 30일)
이전 댓글 표시
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
Thomas
2012년 7월 9일
@Jan - link works for me.. Possibly our network connection issues cropping up again.. :)
채택된 답변
Jan
2012년 7월 9일
편집: Jan
2012년 7월 9일
Have you searched the FEX already?
- http://www.mathworks.com/matlabcentral/fileexchange/20003-panel
- http://www.mathworks.com/matlabcentral/fileexchange/34594-subplotplus-enhanced-layout-matlab-subplot-function
- http://www.mathworks.com/matlabcentral/fileexchange/27991-tight-subplot
- http://www.mathworks.com/matlabcentral/fileexchange/18011-multiplot
- http://www.mathworks.com/matlabcentral/fileexchange/16115-axisprunelabels-clean-up-redundant-axis-labels
추가 답변 (1개)
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));
참고 항목
카테고리
Help Center 및 File Exchange에서 Subplots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!