Can't plot multiple figures in one axes in app designer

조회 수: 1 (최근 30일)
ZC Song
ZC Song 2019년 4월 14일
댓글: ZC Song 2019년 4월 15일
Hi I now struggling in how to plot multiple figures in one axes, below is my code:
function PlotButtonPushed(app, event)
for j = 1:(10)
plot(app.UIAxes,app.RESULTS.profiles_hw(:,j),(app.FE_data.Z),'LineWidth',1)
hold(app.UIAxes,on)
end
end
in which, 'RESULTS' is a matrix contains 10 arraies.
How can I achieve this? My version is Matlab R2019a
Thank you very much!

채택된 답변

Cris LaPierre
Cris LaPierre 2019년 4월 15일
When you push the plot button, what error message are you getting? I suspect it says "Undefined function or variable 'on'."
Try changing your hold command to this:
hold(app.UIAxes,'on')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by