App Designer Multiple Plots

조회 수: 36 (최근 30일)
April Bryan
April Bryan 2017년 9월 8일
댓글: April Bryan 2017년 9월 11일
I am trying to plot a bar graph and a line graph on the same axes in app designer. I know that there is an "add" property. However, I am not sure how to use it.
Please help.
Thanks
April

답변 (1개)

Elizabeth Reese
Elizabeth Reese 2017년 9월 11일
Hi April,
You can use the hold command as you usually would to plot multiple graphs on an axes. You will need to call hold with the axes as an input. Say I had an axes in my app called UIAxes, then the code for overlaying a line and bar graph could look like the following:
y = [75 91 105 123.5 131 150 179 203 226 249 281.5];
bar(app.UIAxes,y);
hold(app.UIAxes);
plot(app.UIAxes,y,'*');
  댓글 수: 1
April Bryan
April Bryan 2017년 9월 11일
Hi Liz,
Thank you very much. The solution works well!
Regards,
April

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by