Matlab AppDesigner: Subplots in a panel disappear

4 ビュー (過去 30 日間)
Hans-Juergen Nitzpon
Hans-Juergen Nitzpon 2024 年 7 月 22 日
回答済み: Avni Agrawal 2024 年 7 月 23 日
I want to plot > 10 subplots in a scrollable panel. When I change the OuterPosition, not all subplots will be plotted or are deleted. In the example app, this happens with more than 10 subplots. The positions of the subplots do not overlap. I tried plotting the subplots in reverse order from bottom to top (like in the example app), but that didn't help either.

回答 (1 件)

Avni Agrawal
Avni Agrawal 2024 年 7 月 23 日
I understand that some subplots are disappearing when the number of subplots exceeds a certain limit. It appears that the code provided has issues correctly calculating and setting the `OuterPosition` of the subplots when the number of subplots (n) is greater than 10. This can often result in subplots overlapping or being positioned outside the visible area.
Consider adjusting the height of the panel or recalculating the outer position accurately. You can also add a warning to check if the subplots are within the height limit:
% Check if the last subplot is within the panel bounds
if hpos > 1 - margin_top
warning('Subplots exceed the available panel height.');
end
I hope this helps.

カテゴリ

Help Center および File ExchangeSubplots についてさらに検索

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by