Effacer les filtres
Effacer les filtres

Matlab AppDesigner: Subplots in a panel disappear

6 vues (au cours des 30 derniers jours)
Hans-Juergen Nitzpon
Hans-Juergen Nitzpon le 22 Juil 2024
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.

Réponses (1)

Avni Agrawal
Avni Agrawal le 23 Juil 2024
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.

Produits


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by