How to make the subplots look larger and use the space judiciously.

1 回表示 (過去 30 日間)
Sophia
Sophia 2016 年 5 月 24 日
コメント済み: Sophia 2016 年 5 月 27 日
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'.

採用された回答

Kelly Kearney
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
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
Sophia
Sophia 2016 年 5 月 27 日
Thanks.. It worked perfectly fine!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSubplots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by