Is there an error in the subplot function in 2025a version
13 次查看(过去 30 天)
显示 更早的评论
The following lines were added to the subplot function in version 2025a (line 291):
if ancestorFigure.Units == "normalized"
waitfor(ancestorFigure,'FigureViewReady',true);
end
That code isn't in version 2024a.
Because of this, I'm experiencing issues that cause the code to stop running when using subplot in this way:
t = 0:0.1:10; y = sin(t);
figure('Units','normalized','Position',[0 0 0.3 0.3])
subplot(1,2,1)
plot(t,y)
subplot(1,2,2)
plot(y,t)
I deleted those lines and everything works fine.
Has anyone else encountered this error?
Does anyone understand the need for those lines of code?
回答(1 个)
Cris LaPierre
2025-6-3
This behavior is not intentional. I'd suggest reporting this here:
2 个评论
Adam Danz
2025-6-3
Workaround addressed in https://www.mathworks.com/matlabcentral/discussions/tips/881887
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
