Plotting map over EOF data
조회 수: 3 (최근 30일)
이전 댓글 표시
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
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
2018년 5월 25일
Post it as an answer and you will get some sweet reputation points (and it will be removed from 'unanswered').
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!