Stop Displayed Image in UI Figure from being Moved by User
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi,
I have this piece of code to display a logo on a UI Axes that ives in a UI figure
Although it plots well, the image isnt fixed, and the user can simply move it about with the mouse.
How can I prevent this.
%display logo on axes
matlabImage = imread('Images\Logo.png'); %read image file
image(app.UIAxes,matlabImage); %plot image in UIAxes component
app.UIAxes.Visible = false; %make axes invisible
Thanks
댓글 수: 0
답변 (1개)
Geoff Hayes
2019년 3월 10일
'Parent' — Parent axes of image object
axes object
Parent axes of image object, specified as the comma-separated pair consisting of 'Parent' and an axes object. Use the 'Parent' name-value argument to build a UI that gives you control of the figure and axes properties.
So you would do something like
imshow(myImage, 'Parent', axesHandle);
where axesHandle is the handle to the axes where you want the image to appear.
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!