How do you end a tiledlayout object
31 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
Cris LaPierre
2020-12-13
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)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Axes Appearance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!