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 CenterFile Exchange에서 Subplots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by