stacked plots with contour- custom lsyout

2 visualizzazioni (ultimi 30 giorni)
HC98
HC98 il 3 Lug 2023
Risposto: Star Strider il 3 Lug 2023
How might I produce sumething like this?

Risposte (1)

Star Strider
Star Strider il 3 Lug 2023
It is likely easiest to use subplot because it allows more options for the axis sizing, while the others (tiledlayout and stackedplot) do not. Much depends on what ‘Plot 1’ and ‘Plot 3’ are, and if the arrows are necessary (they could be difficult, since they are outside of any axes).
Otherwise —
figure
subplot(4,1,1)
plot(rand(10,1))
axpos = get(gca,'Position');
set(gca, 'Position',axpos+[0 0 -0.03 0]);
subplot(4,1,[2 3])
contourf(rand(5))
colormap(turbo)
hcb = colorbar;
cbpos = hcb.Position;
axpos = get(gca,'Position');
set(gca, 'Position',axpos+[0 0 0.1 0]);
subplot(4,1,4)
plot(rand(10,1))
axpos = get(gca,'Position');
set(gca, 'Position',axpos+[0 0 -0.03 0]);
It would be necessary to tweak the 'Position' vector values, however that is not difficult although it could be a bit exasperating to get everything working correctly. One potential problem is to be certain all this fits inside the enclosing figure position so that nothing gets cut off, so that might need to be modified as well.
This should get you started.
.

Categorie

Scopri di più su Line Plots in Help Center e File Exchange

Prodotti


Release

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by