Putting figures within rectangles

1 回表示 (過去 30 日間)
Tom
Tom 2014 年 2 月 21 日
編集済み: Paul 2014 年 2 月 21 日
I am trying to create a page for a journal aricle. The page will display four rectangles that each containing one of the letters A, B, C or D. Each rectangle contains four figures (shown in blue). Above each figure is positioned the letters a, b, c or d. This allows the reader to reference each figure by a big letter followed by a small letter. Is this possible in MATLAB?
Thanks
Tom

採用された回答

Paul
Paul 2014 年 2 月 21 日
編集済み: Paul 2014 年 2 月 21 日
x=1:10;
y=1:10;
figure;
subplot(2,2,1)
plot(x,y);
t=title('a');
subplot(2,2,2)
plot(x,y);
title('b');
subplot(2,2,3)
plot(x,y);
title('c');
subplot(2,2,4)
plot(x,y);
title('d');
If you want the titles aligned to the left instead of the center, use:
title('a','units', 'normalized','position',[0.05 1.05]);
Play with those position values to find what you need.

その他の回答 (1 件)

Image Analyst
Image Analyst 2014 年 2 月 21 日
I'd probably make up each one one at a time and then position with MS Word or Photoshop of something for more control. You can do it with subplot but subplot seems to always have huge amounts of blank space around the plots. To plot the upper left group of 4 you'd use
subplot(4,4,1);
subplot(4,4,2);
subplot(4,4,5);
subplot(4,4,6);
Then to do the others
subplot(2,2,2); % Upper right.
subplot(2,2,3); % Lower left.
subplot(2,2,4); % Lower right.
After each subplot you'd call plot() or bar(), xlabel(), ylabel(), title(), legend() and whatever else you want.

カテゴリ

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