Merging multiple subplots into a mosaic
2 次查看(过去 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!