Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
datacursormode

Subject: datacursormode

From: griffey

Date: 20 May, 2006 21:26:32

Message: 1 of 3

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?

Subject: datacursormode

From: Nima Nikvand

Date: 4 Jan, 2013 01:29:08

Message: 2 of 3

griffey <jimmy.griffey@msa.hinet.net> wrote in message <ef35e2d.-1@webx.raydaftYaTP>...
> 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?

Hello,

use [handle,figure] = gcbo. Then you can call datacursormode on figure (which is a figure handle)

Subject: datacursormode

From: Image Analyst

Date: 4 Jan, 2013 01:42:09

Message: 3 of 3

griffey
You can use impixelinfo(), or you can click on the image with ginput() and get the x,y coordinate and send it to a static text label.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us