griffey <firstname.lastname@example.org> wrote in message <email@example.comYaTP>... > I have designed a GUI. I put some images in axes. But, I want to know > some coordinates on the images. I don't know how to use > datacursormode to output the data cursor. The codes are listed below: > > axes(handles.axes2); > I1=imread('1.bmp'); > imshow(I1);title('Test Image'); > datacursormode(handles.axes2); > dcm_obj = datacursormode(handles.axes2); > > I don't know how to set the "figure_handle" inside "datacursormode". > Now I use "handles.axes2" as "figure_handle", but it doesn't work. > Any idea?
use [handle,figure] = gcbo. Then you can call datacursormode on figure (which is a figure handle)