- 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
조회 수: 140 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Cris LaPierre
2021년 7월 20일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!