How to remove the black outlines when using 'image' command to display a image.
Afficher commentaires plus anciens
Hi everyone,
I wanna display an image but also want to drag and drop this image. As far as I know, if I use command 'imshow' to display the image it is not draggable. I therefore have to use command 'Image' to display a single pixel image.
To simplify my question, I use the minimum code to this problem. See below.
Figure;
axes; % to draw an axes
I = ones(1,1,3); I(:,:,1) = 255; I(:,:,2) = 255;I(:,:,3) = 0; % to create a single pixel image file (yellow of course).
image(I) % display the single pixel yellow image in the axes.
ALL THE OUTLINES AROUND THE YELLOW IMAGE ARE UNWANTED. THEREFORE,
set(gca,'xtick',[]); % remove ticks on x-axis
set(gca,'ytick',[]); % remove ticks on y-axis
It then left with the black outlines around the yellow image which is unwanted. See below.
My question is: how to remove these black outlines if I use command 'Image' to show an image which can be dragged later on?
Many thanks!
Lily
1 commentaire
Rena Berman
le 5 Mar 2019
(Answers Dev) Restored edit
Réponse acceptée
Plus de réponses (1)
Image Analyst
le 7 Juil 2017
Set Box to off:
ax = gca
properties(ax) % Display properties if you want to see what you can control.
ax.Box = 'off'; % Turn off the box
Catégories
En savoir plus sur Image Arithmetic dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!