How can I use plotmatrix over UIAxes in app designer?
2 次查看(过去 30 天)
显示 更早的评论
Hi All,
I want to use plotmatrix over UIAxes in app designer but I encounter with an error message as follow:
X = rand(1000,3);
plotmatrix(app.UIAxes,X,'.b');
*Error:
Adding a plotmatrix to a container with the 'AutoResizeChildren' property set to 'on' is not supported.
How can I resolve this issue? Can you please help me to correct my code? I could not set 'AutoResizeChildren' of UIAxes to 'off'.
Thanks in advance,
MS
0 个评论
采纳的回答
Dave B
2021-7-30
AutoResizeChildren is a property on the UIFigure, not the UIAxes.
If you select app.UIFigure in the Component Browser you'll see AutoResizeChildren under Position
2 个评论
Dave B
2021-7-30
That gets a little tricky, I think that plotmatrix wants it off, not just off temporarily.
The documentation for UIFigure's AutoResizeChildren indicates that "The AutoResizeChildren property affects direct children of the container, not children inside nested containers."
If you need AutoResizeChildren to be on for other aspects of the app, you might try putting the plotmatrix in a panel and turning off AutoResizeChildren for the panel (i.e. by making a panel, putting the uiaxes in the panel, and turning AutoResizeChildren off for the panel before calling plotmatrix).
This page has some other suggestions regarding alternatives to AutoResizeChildren and probably is more clear about how it works than I can be!
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop uifigure-Based Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!