How to make the subplots look larger and use the space judiciously.
1 次查看(过去 30 天)
显示 更早的评论
figure(1);
clf;
for i = 1 : 11;
subplot(4,6,i)
m_proj('Stereographic','lat',90,'long',300,'radius',35,'rect','on');
if i<=6;
m_contourf(long,lat,wint2_u(:,:,i),'linestyle','none');
else
m_contourf(long,lat,an_u(:,:,(i-6)),'linestyle','none');
end
m_grid('linewi',1,'tickdir','out',...
'xtick',6,'ytick',[72 78 84 90],...
'xticklabel',[]);
m_coast('patch',[.6 .6 .6],'edgecolor','k');
m_elev('contour',[ ],'edgecolor',' ');
caxis([-11 6])
axis tight
axis off
end
h4=colorbar;
set(h4, 'Position', [.785 .550 .01 0.15])
I like the following link and treid using it but did not work out. Any suggestions how can i use this in my script. http://stackoverflow.com/questions/6685092/how-to-reduce-the-borders-around-subplots-in-matlab
The error message is Undefined function 'subaxis' for input arguments of type 'double'.
0 个评论
采纳的回答
Kelly Kearney
2016-5-25
To use the subaxis function, you need to follow the link provided there on the stackoverflow answer you reference (or this one: subaxis), download that code, and place it somewhere on your Matlab path.
3 个评论
Kelly Kearney
2016-5-26
To add titles, save the handles to your axes
ax(i) = subaxis(3, 6, i, ...)
Then you can pass the handles to title
for ii = 1:length(ax)
title(ax(ii), sprintf('Thing %d', ii));
end
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subplots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!