Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I plot points on a graph with an image in the background.

29 views
Skip to first unread message

Aaron Anstey

unread,
Aug 2, 2010, 10:32:05 PM8/2/10
to
MATLAB is not letting me plot a line of longitude and latitude coordinates onto an image I have imported from google maps. The longitude and latitude coordinates have a small value range on the x and y axes (x=50.7-50.9 y=1.02-1.03), wheras the image x and y values are much larger. I want to overlay the line plot of longitude and latitude points onto the image without the image becoming distorted.

Can I make the background image remain the same (i.e. decoupled from the graph axis values)?

Ross W

unread,
Aug 3, 2010, 3:22:04 AM8/3/10
to
"Aaron Anstey" <ela...@lboro.ac.uk> wrote in message <i37v35$80$1...@fred.mathworks.com>...

> MATLAB is not letting me plot a line of longitude and latitude coordinates onto an image I have imported from google maps. The longitude and latitude coordinates have a small value range on the x and y axes (x=50.7-50.9 y=1.02-1.03), wheras the image x and y values are much larger. I want to overlay the line plot of longitude and latitude points onto the image without the image becoming distorted.
>
> Can I make the background image remain the same (i.e. decoupled from the graph axis values)?

Hi

If you post a brief code snippet,we should be able to help.
If you use the image command to show the map, are you calling it as image(data) or image(maplong,maplat,data)?

Something like this should do what you want:

image(maplong,maplat,data)
axis equal
hold on
plot(long,lat,'o')

Ross

0 new messages