Putting figures within rectangles

1 visualizzazione (ultimi 30 giorni)
Tom
Tom il 21 Feb 2014
Modificato: Paul il 21 Feb 2014
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

Risposta accettata

Paul
Paul il 21 Feb 2014
Modificato: Paul il 21 Feb 2014
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.

Più risposte (1)

Image Analyst
Image Analyst il 21 Feb 2014
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.

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by