Stop Displayed Image in UI Figure from being Moved by User
2 ビュー (過去 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.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!