How to add a border around a figure?

42 ビュー (過去 30 日間)
A
A 2015 年 5 月 11 日
回答済み: Shawn Rogers 2018 年 5 月 10 日
Hi there - I basically have the below three 'subfigures' in one FIGURE. I would like to put a border between them to create a bit of a division. Is this possible?
Thanks very much! appreciate all the help here.
h1 = subplot(1,3,1);
surf(peaks);
colormap(h1, winter);
axis square;
title('FIGURE 1A', 'FontSize', 12, 'fontweight', 'bold')
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
h2 = subplot(1,3,2);
surf(peaks);
axis square;
colormap(h2, autumn);
title('FIGURE 1B', 'FontSize', 12, 'fontweight', 'bold')
h3 = subplot(1,3,3);
surf(peaks);
colormap(spring);
axis square;
title('FIGURE 1C', 'FontSize', 12, 'fontweight', 'bold')

回答 (2 件)

Image Analyst
Image Analyst 2015 年 5 月 11 日
In your other question, Sean suggested putting the axes into a panel. That should work.
  3 件のコメント
Image Analyst
Image Analyst 2015 年 5 月 11 日
Walter Roberson
Walter Roberson 2015 年 5 月 11 日

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


Shawn Rogers
Shawn Rogers 2018 年 5 月 10 日
Try this example with the axes command which will place a box around a figure including the title and axis labels.
figure
axes('Position',[0 0 1 1],'xtick',[],'ytick',[],'box','on','handlevisibility','off')
plot([0 1],[0 1]);
xlabel('x');
ylabel('y');
title('Title')

カテゴリ

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