i have written codes for a plot in .m file now i wanna plot the same thing in a interface made by using appdesigner.
this is my plotCapture1.PNG
i want to plot it here
Capture3.PNG

 採用された回答

Ajay Kumar
Ajay Kumar 2019 年 10 月 25 日
編集済み: Ajay Kumar 2019 年 10 月 25 日

2 投票

You can give axes handle in the plot.
for example, if you used
plot(x,y);
now, use
plot(app.UIAxes,x,y);
and ofcourse, the testtesttest function should have the handles of app.

10 件のコメント

Ni2
Ni2 2019 年 10 月 25 日
編集済み: Ni2 2019 年 10 月 25 日
What is handles of app??
I dnt think i have them
My problem is my plot comes in 2D
View[1 1 1] is not working And same window is poping two times in one run. One with blank plot and one with 2D plot.
Ajay Kumar
Ajay Kumar 2019 年 10 月 25 日
Are you calling the testtesttest.m from app designer?
Ni2
Ni2 2019 年 10 月 25 日
No i m not calling testesttest.m from app designer.
I an writing the testtesttest.m codes into the app designer
Please check my new post.
Mudasir JAMIL
Mudasir JAMIL 2020 年 5 月 5 日
Hi Ajay, I am trying to display an image in the Axes with 'imshow(I)' command where I contains my image.
Can you kindly tell me the command to use. I am using Matlab 2019.
it works when I use plot(app.UIAxes,x,y) but I dont understand how to use 'imshow'.
I have watched several videos but nothing helped.
Waiting for your reply.
Thanks
Ajay Kumar
Ajay Kumar 2020 年 5 月 6 日
Try this
imshow(I,'Parent',app.UIAxes);
Mudasir JAMIL
Mudasir JAMIL 2020 年 5 月 6 日
Thank you very much, it worked
Eric Sargent
Eric Sargent 2020 年 12 月 9 日
編集済み: Eric Sargent 2020 年 12 月 9 日
Ni2, you can find the handle of the axes in the Component Browser in App Designer. By default, the first one will be named "app.UIAxes" and subsequent ones will be "app.UIAxes_2" and so on. You can change the handle / name of the axes by double-clicking the name in the Component Browswer and entering a new name.
Aishwarya Lakshmi Srinivasan
Aishwarya Lakshmi Srinivasan 2021 年 3 月 1 日
編集済み: Aishwarya Lakshmi Srinivasan 2021 年 3 月 1 日
Hi @Ajay Kumar. I am trying to display a figure from a .m file in the app (3D plot) using imshow(I,'Parent',app.UIAxes);
But I get an error of undefined variable of function for I when I try to run the app. Can you please suggest what can be done !
code in xyz.m file --> plotReadData=figure;
code in .mlapp file --> run xyz.m;
imshow(plotReadData, 'Parent', app.UIAxes);
Deyan Prashna
Deyan Prashna 2022 年 4 月 29 日
Based on the experience I've tried and succeeded, try typing this:
imshow(picture.jpg,'Parent',app.UIaxes)
For the picture format, it can be other than .jpg., and pay attention to the field name of the UI Axes used.
Hope it helps ^_^
Biraj Khanal
Biraj Khanal 2022 年 6 月 9 日
How do you use fnplt for uiaxes?
plot(app.uiaxes,x,y) works but fnplt(app.uiaxes,cscvn(points)) does not. Does anyone have any suggestion?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDevelop Apps Using App Designer についてさらに検索

質問済み:

Ni2
2019 年 10 月 25 日

コメント済み:

2022 年 6 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by