3 subplots with the bottom one split in 2 vertically?
Mostra commenti meno recenti
I want to produce a figure with 3 stacked plots where the bottom one is split in half vertically, how might I do this? TIA
3 Commenti
Dyuman Joshi
il 26 Mar 2023
Can you give an example of the layout?
Dyuman Joshi
il 26 Mar 2023
Just a note - The output you want is horizontally stacked, not vertically.
Risposta accettata
Più risposte (2)
Bruno Luong
il 26 Mar 2023
1 voto
Plenty of examples are given in the doc page
Is this what you mean?
close all
x = -10:0.01:10;
y = cos(x);
ax=subplot(2,2,[1,2]); axis square
plot(x,y)
ax.Position=shrink(ax.Position);
subplot(2,2,3); plot(x,y); axis square
subplot(2,2,4); plot(x,y); axis square
function pos=shrink(pos)
o=pos(1:2);
d=pos(3:4);
pos=[o(1)+d(1)/3,o(2),d(1)/3,d(2)];
end
Categorie
Scopri di più su Subplots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



