Borrar filtros
Borrar filtros

stacked plots with contour- custom lsyout

7 visualizaciones (últimos 30 días)
HC98
HC98 el 3 de Jul. de 2023
Respondida: Star Strider el 3 de Jul. de 2023
How might I produce sumething like this?

Respuestas (1)

Star Strider
Star Strider el 3 de Jul. de 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.
.

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by