Putting figures within rectangles
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens

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
0 commentaires
Réponse acceptée
Paul
le 21 Fév 2014
Modifié(e) : Paul
le 21 Fév 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.
0 commentaires
Plus de réponses (1)
Image Analyst
le 21 Fév 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.
0 commentaires
Voir également
Catégories
En savoir plus sur Subplots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!