Matlab AppDesigner: Subplots in a panel disappear
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
Divyam
le 22 Juil 2024
Check that your plots follow this requirement for properly displaying components using the "scrollable" property: https://www.mathworks.com/help/matlab/ref/matlab.ui.container.panel-properties.html?s_tid=srchtitle_site_search_3_ability%2520to%2520scroll#mw_c50e0be5-6b7c-4c69-822c-240c176076c4:~:text=Components%20that%20do%20not%20fit%20in%20the%20container%20must%20be%20above%20or%20to%20the%20right%20of%20the%20container.%20You%20cannot%20scroll%20to%20components%20that%20are%20below%20or%20to%20the%20left%20of%20the%20container.
Réponses (1)
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.
0 commentaires
Voir également
Catégories
En savoir plus sur Subplots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!