- Drag a panel component from the Component Library onto your canvas.
- Set the AutoResizeChildren property of the panel to 'off'.
- Specify the panel as the parent container using the 'Parent' name-value argument when you call subplot. Also, specify an output argument to store the axes.
- Call the plotting function with the axes as the first input argument.
Subplot in Matlab Appdesigner
139 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Unfortunately I have gone through mane documentations and question answers but I coudn't find a clear soulution of subplot in matlab app designer. I want to plot this in -- app.UIAxes2
Please help me with this. I am giving my code down below.
subplot(311);
plot(days,cral,days,crbl,'--');
title('Effective contact/transmission rate');
legend('After lockdown', 'Before Lockdown');
subplot(313);
plot(days,TNI,days,TNIwl,'--');
title('Comparison of Total infecteds');
legend('Lockdown', 'Without Lockdown');
subplot(312);
plot(days,I,days,Iwl,'--');
title('Comparison of I');
legend('Lockdown', 'Without Lockdown');
The graph I get from matlab is given below
0 Kommentare
Antworten (1)
Cris LaPierre
am 20 Jul. 2021
The specific text that applies is as follows:
For example, the subplot function does not support automatic resizing. To use this function in your app:
app.Panel.AutoResizeChildren = 'off';
ax1 = subplot(1,2,1,'Parent',app.Panel);
ax2 = subplot(1,2,2,'Parent',app.Panel);
plot(ax1,[1 2 3 4])
plot(ax2,[10 9 4 7])
0 Kommentare
Siehe auch
Kategorien
Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!