gui with two axes using imagesc
13 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Image Analyst
on 21 May 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?
See Also
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!