How to insert an image in a uifigure

조회 수: 63 (최근 30일)
Bernardo Macara
Bernardo Macara 2020년 10월 25일
답변: Monisha Nalluru 2020년 10월 30일
Hello, i use matlab r2018a,
I want to put an image above a checkbox for the user to chose from.
i create an uifigure and then i use an uicheckbox but i need to find a way to put a picture aboce the checkbox. I have a problem and i cant use uiimage because i need an upgraded version. So using matlabr2018a is there a way i can insert the image into the uifigure?

채택된 답변

Monisha Nalluru
Monisha Nalluru 2020년 10월 30일
You can display the image in uifigure by having uiaxes as image parent.
As an example
f=uifigure;
ax=uiaxes(f);
imagedata= imread('image.png');
image(imagedata, "Parent", ax);
ax.Visible='off';
Using the uiaxes Position property you can specify the position of image above checkbox.
Hope this helps!

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop uifigure-Based Apps에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by