Data cursor: Let Y coordinate increase instead of decrease (moving from bottom to top)

Dear all,
I have a screenshot of Google maps and I want to obtain the coordinates of the stars on the image.
I used Tools > Data Cursor and what I got was this:
Now the problem is, when you go more to right in the image, the X coordinate increases. But when you go up in the images, the Y coordinate decreases (instead of increasing).
How can I change this? At the end I need a list of all the coordinates.
Thank you!
Regards,

Answers (1)

Flip your image in the vertical dimension before plotting it, e.g.
figure; hAxes = gca; imagesc( hAxes, flip( myImage, 1 ) );
then use
set( hAxes, 'YDir', 'normal' )
where hAxes is your axes handle.

4 Comments

Hi Adam,
Thanks for your fast answer. This is actually the first time using Matlab. Will I lost all my data points (150) ?
And where do I have to enter this command? I have only the .fig file from last session
You can't change the data cursor points once they are picked. I can't remember off-hand if you can get data cursor points afterwards either, I only ever use a couple at any time.
You would have to put my command before plotting so yes you would lose all the picks.
Is it that important that they increase in that direction?
If you are able to get hold of them then you can just subtract all the y values from the maximum to flip them round.
Yes, it's important that they increase because I will important these points in Maple to create a graph.
Where can I find the maximum y-value of the figure and what's the easiest way to substract the y-values from the maximum?
Thanks,
The maximum should just be the number of rows in your image if you didn't plot it with any specific y values.

Sign in to comment.

Asked:

on 16 Jun 2017

Commented:

on 19 Jun 2017

Community Treasure Hunt

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

Start Hunting!