gui with two axes using imagesc

7 Ansichten (letzte 30 Tage)
Dimitrios
Dimitrios am 21 Mai 2012
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

Antworten (1)

Image Analyst
Image Analyst am 21 Mai 2012
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 Kommentar
Dimitrios
Dimitrios am 21 Mai 2012
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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by