I'm using uistack to reorder elements on an axes generated using GUIDE. I receive the error:
Error using ==> get
Invalid handle
Error in ==> uistack at 61
Parent=get(Handles,{'Parent'});
My code is:
axes(handles.axes1);
imagesc(output_image); % Plot image
uistack(output_image, 'bottom');
I tried to put in if statements to check if it is necessary to run the function, and I've tried various renamings of the output_image. Any help is much appreciated, thank you!

댓글 수: 1

try to pass your axes handle instead of the name of your imagedata.
uistack(handles.axes1,'bottom')

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

 채택된 답변

Adam
Adam 2018년 6월 12일

1 개 추천

hImage = imagesc(output_image); % Plot image
uistack( hImage, 'bottom');
You need to keep the graphics handle output of the imagesc function and pass that to uistack. You are just passing raw data that has nothing to do with any graphics object itself.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

질문:

2018년 6월 12일

답변:

2018년 6월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by