Plotting map over EOF data

3 次查看(过去 30 天)
Jaime  de la Mota
Jaime de la Mota 2017-3-28
评论: jonas 2018-5-25
I have plotted some measurements in the latitude and longitude in which they have been measured. I want to plot a physical map over them. I have tried with geoshow but it doesn't work. Can someone please tell me how can I add a physical map of the region I am studyng over the already plotted data?
Thanks for reading
if true
for i=1:3
figure
f=linspace(0,1,100);
for j=1:size(EOF,1)
m2=max(max(EOF(:,i)));
mn2=min(min(EOF(:,i)));
c2=(EOF(j,i)-mn2)/(m2-mn2);
color2b(j,:)=[0.3*c2 0*c2 (1-c2)];
lat=coord2(j,1);
lon=coord2(j,2);
if EOF(j,i)<0
plot(lon,lat,'r*','MarkerSize', 0.5)
a=text(lon,lat,num2str(EOF(j,i),3),'Color','r','Fontsize',abs(EOF(j,i))*30)
hold on
else
plot(lon,lat,'b*','MarkerSize', 0.5)
a=text(lon,lat,num2str(EOF(j,i),3),'Color','b','Fontsize',abs(EOF(j,i))*30)
hold on
end
hold on
end
end
end
  2 个评论
Fernando Bello
Fernando Bello 2018-5-24
Hello my friend. I know it is maybe too late for the answer... but anyway. I'll attach a function for you.
Here is an example of how you should use this... 1) Place the file "rgrd_WorldCstLinePacific.mat" on a folder. 2) Place "world_coast.m" in the same folder 3) in your code write this: just after your plots world_coast(lonmin,lonmax,latmin,latmax,'k') %['k' for black color]
And that's it! :D
If you need other map of the world you can search and download it. They are available in different sites. Anyway you try to use it.
Ex: world_coast(-122,-117,32,35,'k') % this will plot California's coast ;)
jonas
jonas 2018-5-25
Post it as an answer and you will get some sweet reputation points (and it will be removed from 'unanswered').

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by