plotting colorcoded points on a map
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Darragh Kenny
am 24 Okt. 2018
Kommentiert: Darragh Kenny
am 24 Okt. 2018
Hi,
I am trying to plot significant trends in the standard precipitation evaporation index onto a map of Zimbabwe. So far, I am only showing positive and negative trends, but I would like to have a colorcode on each point signifying the magnitude. How do I do that?
clear all;
SPEI12=dlmread('SPEI12_zimbabwe.txt');
gridZim=load('gridZim.mat');
gridZim=struct2cell(gridZim);
gridZim=gridZim{1};
temp=regexp(gridZim,'\d{1,8}','match'); %here I'm just reading out the gridpoints
for i=1:length(gridZim)
gridpoints(:,i)=str2double(temp{i});
long_lat(i,:)=[gridpoints(1,i)+0.01*gridpoints(2,i) -gridpoints(3,i)-0.01*gridpoints(4,i)];
end
for i=1:length(SPEI12(1,:))
[taub(i) tau(i) h(i) sig(i) Z(i) S(i) sigma(i) sen(i) n(i) senplot(i) CIlower(i) CIupper(i) D(i) Dall(i) C3] = ktaub([SPEI12(:,i) [1:1345].'], 0.05, 0); %checking for significant trends with Mann-Kendall and quantifying the trend with Sen's slope
end
worldmap('Zimbabwe');
bordersm
hold on
long=long_lat(find(h==1),1); %h==1 signifies a significant trend. I just want to plot the gridpoints with a significant trend
latit=long_lat(find(h==1),2);
sen_s=sen(find(h==1));
for i=1:length(sen_s)
if sen_s(i)<0
plotm(latit(i),long(i),'bp')
end
if sen_s(i)>0
plotm(latit(i),long(i),'rp')
end
end
m=worldmap('Zimbabwe');
bordersm
hold on
plotm(long_lat(:,2),long_lat(:,1),sen.') %this is not working
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Descriptive Statistics and Visualization finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!