Plots in app designer

조회 수: 4 (최근 30일)
Asad Elmgerbi
Asad Elmgerbi 2020년 5월 17일
댓글: Asad Elmgerbi 2020년 5월 18일
Dears ,
Have question regrading ploting in app designer ,
I have the following code for ploting a figure
figure(1);
barh(predictorImportance)
grid on
set(gca,'ytickLabel',inputNames(sortedIndex))
xlabel({'Predictor Importance for ', convertCharsToStrings(outputNames) })
........................................
How can do code change so that it fit to app. uiaxes , in other words , how I can use app. uiaxes to make the same plot .

채택된 답변

Mohammad Sami
Mohammad Sami 2020년 5월 18일
You can specify the handle of the uiaxes, so that matlab knows which axes to plot on.
barh(app.UIAxes,predictorImportance);
grid(app.UIAxes,'on');
set(app.UIAxes,'ytickLabel',inputNames(sortedIndex));
xlabel(app.UIAxes,{'Predictor Importance for ', convertCharsToStrings(outputNames) });
  댓글 수: 1
Asad Elmgerbi
Asad Elmgerbi 2020년 5월 18일
Thanks Mohammad .
It works

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

추가 답변 (0개)

카테고리

Help CenterFile 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!

Translated by