MATLAB App Designer hold on/off throwing warnings

조회 수: 12 (최근 30일)
rohit
rohit 2020년 11월 2일
댓글: J. Alex Lee 2020년 11월 3일
I'm beginner and trying to use polarplot and hold on/off in MATLAB App Designer. Now to use this in app designer, we need to create the polar axes by calling the polaraxes function in the app designer panel container.
I tried this which is working fine without any error:
pax = polaraxes(app.Panel);
polarplot(pax,th,r1,'red')
hold(app.UIFigure.CurrentAxes,'on'); % warning
polarplot(pax,r2,'green')
hold(app.UIFigure.CurrentAxes,'off'); % warning
But due to app coding alerts, I'm getting the warning "Specify a UIAxes handle as first argument" for the hold line. How do I resolve this warning ? Is this the correct way to use hold on/off for the panel container?

채택된 답변

J. Alex Lee
J. Alex Lee 2020년 11월 2일
I would set the "NextPlot" property of the polar axes to "add".
pax.NextPlot = 'add';
  댓글 수: 2
rohit
rohit 2020년 11월 3일
And for hold off, I should use :
pax.NextPlot = 'replace';
Right?
J. Alex Lee
J. Alex Lee 2020년 11월 3일
yes. there's really no need to switch back to that after you've finished all your plots, or at least i can't see any reason.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Polar Plots에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by