gui with two axes using imagesc

Hello,
I have been trying to put two images in two different axes in my gui using imagesc(). If I put just one , everything seems to work fine, but when I try to put the second one, then axis ticks appear on the first one and when I try to use plot(axes handle,...) it creates the plot on the second axes. The code looks something like that:
width = 600; height = 600;
handles.h1 = imagesc(zeros(height,width,'uint16'),'Parent',handles.axes1);axis off;
handles.h2 = imagesc(zeros(height,width,'uint16'),'Parent',handles.axes2);axis off;
...
set(handles.h1,'CData',D); drawnow;
hh=plot(handles.h1,x,y,':.w');
...
Any suggestions?
Thanks, Dimitris

답변 (1개)

Image Analyst
Image Analyst 2012년 5월 21일

0 개 추천

After you display your "zero" images, why are you then blowing it away with the "D" image? Then why are you trying to plot some 1D x,y data into the "D" image object that is living in the handles.axes1 axes (which will blow away your original D)? What are you trying to do? Do you really want to display an image, to do you want to graph some x,y data?

댓글 수: 1

Dimitrios
Dimitrios 2012년 5월 21일
I am actually working on a hand recognition programme. The idea is to, firstly, initialize the axes with zero images, then load the frame matrix from the camera and finally plot the point x,y which comes from the handrecognition function. Additionally, I want to have a second axes, in order to show the direction of the gesture, its speed, etc. What seems strange if I display everything (video, points, arrows for direction and speed etc) in one axes, everything works flawlessly. It only gets messy when I put the second axes from guide.

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

카테고리

도움말 센터File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

질문:

2012년 5월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by