Stop Displayed Image in UI Figure from being Moved by User
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Geoff Hayes
el 10 de Mzo. de 2019
'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.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!