MATLAB Answers


add reference point with known x y coordinates on imagesc

Asked by Fikret Dogru on 15 Feb 2019
Latest activity Commented on by Cris LaPierre
on 16 Feb 2019
Hi all,
I need to help about adding point on imagesc plot. I need to add a point with known x and y values (coordinates). But I know the x and y values so I do not want to use ginput or datacursormode. Could we make manual position for datacursormode? I just want to show that point on figure as a 'dot' or '+'. Any help would be great. Thanks


Sign in to comment.

1 Answer

Answer by Cris LaPierre
on 15 Feb 2019

If you have the computer vision toolbox, use insertText.
If not, use the text function.
Just keep in mind that in an image, 0 for the Y axis is the top left corner instead of the bottom left.


Yeah I have this toolbox. But I have x y coordinates as WGS 84 geographic not pixel values. First I need to find my x y coordinates on which pixel. But the x y coordinates not in the x and y workspace variable. For example my x is 29.2 and y 40.3 but the x and y values change 0.001 so how can I do that? Thanks
Not familiar with that, but I wonder in the enu2ecef function in the mapping toolbox is helpful. I got there from this answer. If not, I'm afraid without more info I can't be of much help as I'm not familiar with this type of data.
Looks like geodetic2enu might be helpful as well? For the spheroid, you could use
spheroid = wgs84Ellipsoid('km');
to specify the wgs84 geopgraphic units.

Sign in to comment.