How do you end a tiledlayout object

31 visualizaciones (últimos 30 días)
jake zhao
jake zhao el 13 de Dic. de 2020
Comentada: jake zhao el 13 de Dic. de 2020
Im using a live script to generate multiple figures for a project and am using tiledlayout for some of the plots. Im running into the issue where after I call the function and use all the tiles, I am unable to generate normal plots again without explicitly generating a new tiledlayout object of size 1x1. Instead it will either overwrite the last plot of the tiledlayout or do some weird stuff. Is there anyway to stop the tiled layout?

Respuesta aceptada

Cris LaPierre
Cris LaPierre el 13 de Dic. de 2020
Use figure to create a new figure window for plotting the next plot.
Live scripts will continue to use the same figure for all plotting unless you explicitly create a new one. If you use section breaks, what you see in each section are snapshots of the same figure, rather than new figures (unless you've created it with figure).
tiledlayout(1,2);
[X,Y,Z] = peaks(20);
% Tile 1
nexttile
surf(X,Y,Z)
% Tile 2
nexttile
contour(X,Y,Z)
% New plot
figure
x=1:5;
y=x.^2;
plot(x,y)

Más respuestas (0)

Categorías

Más información sobre Axes Appearance en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by