Why does my axes disappear when putting a background image?

Good evening. I have the following problem. I am using this code to put an image in a Gui in the background, the objects that I have in the Gui remain visible on the image, except for my 2 axes that I have in the GUI, which seem to be hidden in the image. What should I do to make them look? Thank you.
ha = axes('units','normalized', ...
'position',[0 0 1 1]);
uistack(ha,'bottom');
I=imread('eight.tif');
hi = imagesc(I)
colormap gray
set(ha,'handlevisibility','off', ...
'visible','off')
axes('position',[0.3,0.35,0.4,0.4])

댓글 수: 6

I am also using this other code and I cannot solve the problem.
ha = axes('units','normalized','position',[0 0 1 1]);
I=imread('Captura.png');
hi = imagesc(I)
set(ha,'handlevisibility','off','visible','off')
uistack(hi,'bottom')
ha = axes('units','normalized', ...
'position',[0 0 1 1]);
uistack(ha,'bottom');
I=imread('eight.tif');
hi = imagesc(ha, I)
colormap(ha,gray)
set(ha,'handlevisibility', 'off', ...
'visible', 'off', ...
'position', [0.3,0.35,0.4,0.4])
@Walter Roberson. thanks for your prompt reply, but unfortunately it did not work.
Removing this line of code shows the GUI clean and with all my objects:
uistack(ha,'bottom');
but adding the line the background image hides the axes.
Does the new axes overlap any of the existing axes? If so, it will make them disappear I think. At least with subplot() it does. Please post screenshots before and after displaying the image.
set the axes Layer property to 'top' (default is 'bottom')
@Image Analyst
@Walter Roberson
Thank you very much for your answers. Solve the problem by modifying the "Design" option for the "GUI" and for the "axes". The strange thing is that before it worked perfectly and suddenly this happened, without modifying the specific options.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Images에 대해 자세히 알아보기

제품

릴리스

R2017b

질문:

2020년 4월 1일

댓글:

2020년 4월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by