App Designer | hold on does not work as expected
조회 수: 90 (최근 30일)
이전 댓글 표시
In live scripts or simple matlab code I normaly draw slice and two plot3 graphics in one axes:
but, using App Designer, it cant draw normally:
1 - only slice, 2 - slice and 2 plot3, 3 - slice and one plot3
code for App Designer: (V - 3-d matrix)
hold on;
colormap(app.fullaxes, map);
s = slice(app.fullaxes, app.y_3, app.x_3, app.z_3, app.V, 0,0,15);
set(s, 'EdgeAlpha',0.1);
plot3(app.fullaxes, y_1, x_1, z_1, 'Color', app.color_2);
plot3(app.fullaxes, y_2, x_2, z_2, 'Color', app.color_3);
hold off;
댓글 수: 0
채택된 답변
Kevin Holly
2022년 5월 17일
I believe you need to specify the axes of your hold on. Please let me know if this works.
hold(app.fullaxes,'on');
colormap(app.fullaxes, map);
s = slice(app.fullaxes, app.y_3, app.x_3, app.z_3, app.V, 0,0,15);
set(s, 'EdgeAlpha',0.1);
plot3(app.fullaxes, y_1, x_1, z_1, 'Color', app.color_2);
plot3(app.fullaxes, y_2, x_2, z_2, 'Color', app.color_3);
hold(app.fullaxes,'off');
추가 답변 (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!