App Designer: How to plot graph from own function into UIAxess?

조회 수: 15 (최근 30일)
Anna Chrbolková
Anna Chrbolková . 2021년 11월 9일
댓글: Grace . 2022년 12월 13일
I have a few functions of different cartographic projections together with orthodrome and loxodrome in individual scripts (function in m-file). The coordinates of the points of both curves are at the input. When I run the function, a graph window pops up.
In the App Designer, when I press the calculation button (výpočet), I would need to display the graph in UIAxess and not in a pop-up. I'm a new in App Designer and I don't know how to do it. Here is a sample:
In school we have a project, so sorry that the script is half in Czech.
Thank you for answer.

답변 (1개)

Joseph Cheng
Joseph Cheng 2021년 11월 9일
편집: Joseph Cheng 님. 2021년 11월 9일
if you look at the plot() function or any other display/plotting tools like imagesc(), image(), imshow(), etc... the first entry can be the target axis handle. so in app designer the default tag for the axes is app.UIAxes like in your commented out line plot(app.UIAXes,......) which tells plot to put the plot in the app.UIAXes. otherwise matlab appdesigner will open up a new figure. you can get the tag/name by looking at the design view and clicking on highlighted name.
  댓글 수: 4
Grace 2022년 12월 13일
Hello Anna,
Did you get the answer to your question I have tried so many ways so far but no solution. If you got it right, Kindly help. However, i am using the control chart function.
Thank you.

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


Help CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기




Community Treasure Hunt

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

Start Hunting!

Translated by