필터 지우기
필터 지우기

How to display image in multiple plots in GUIDE

조회 수: 2 (최근 30일)
TheBeginner
TheBeginner 2013년 1월 7일
Hello,
I have to axes on my GUI : axe1 and axe2 and I want to display two images in the opening function, so I do this :
axes(handles.axe1)
imagesc(image1);
axes(handles.axe2)
imagesc(image2);
The first command works well and displays the image on axes1. But the second command displays image2 on axe1 and axe2, erasing the work of the first command on axe1.
Any idea on how to avoid this?
Thank you!
  댓글 수: 4
Matt J
Matt J 2013년 1월 7일
Do you do anything to handles.main_image and handles.blurred_image before attempting to display to them?
TheBeginner
TheBeginner 2013년 1월 7일
I have tried to do it on a test-GUI and it worked well. It is strange, because I think I didn't do anything to the axis.
I will try to find what the error is, thank you!

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

채택된 답변

Image Analyst
Image Analyst 2013년 1월 7일
Alternatively you don't need to call axes() and do it like this:
imshow(image1, 'Parent', handles.main_image);
imshow(image2, 'Parent', handles.blurred_image);
  댓글 수: 1
TheBeginner
TheBeginner 2013년 1월 9일
Actually the error was because I had the program that charged lena_blurred display an image, so it interfered with these lines.
Sorry for the annoyance, and thank you!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Object Properties에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by