MATLAB Answers

how to plot in UIAxes in app designer

343 views (last 30 days)
Ni2
Ni2 on 25 Oct 2019
Commented: Mudasir JAMIL on 6 May 2020
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

  0 Comments

Sign in to comment.

Accepted Answer

Ajay Kumar
Ajay Kumar on 25 Oct 2019
Edited: Ajay Kumar on 25 Oct 2019
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.

  6 Comments

Show 3 older comments
Mudasir JAMIL
Mudasir JAMIL on 5 May 2020
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 on 6 May 2020
Try this
imshow(I,'Parent',app.UIAxes);
Mudasir JAMIL
Mudasir JAMIL on 6 May 2020
Thank you very much, it worked

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by