I'm making my own Shakemap (so far, Shamemap) with Matlab. A Shakemap is a representation of the intensity of ground shaking in a map (google it up for more info). I want it to be similar to those from the USGS, in which they plot the intensity using a jet colormap and they control the shading to represent the altimetry data. So far I haven't figured out how they do this.
I have a set of coordinates with the location's elevation (from NASA's SRTM) and in the same set of coordinates I have some parameters of ground shaking.
[lat long SRTM]
[lat long GroundShaking]
I can contour them separately, but if I put them in the same figure just like that one overrides the other.
How can I put them in the same figure? I have thought about assigning a new value to each location such that the new value accounts for both measures; locations with the same GroundShaking parameter should be the same color, but if one is higher then that one should be darker. Unfortunately I don't know how to implement this. I have also thought about setting the alpha feature manualy, but I can't make it work only for the Ground Shaking data. Any suggestions ?
MWE:
x=0:0.01:1;
y=0:0.01:1;
[xx,yy]=meshgrid(x,y);
asd1=zeros(length(x),length(y));
ads2=asd1;
for i=1:length(x)
for j=1:length(y)
asd1(i,j)=x(i)*y(j);
asd2(i,j)=x(i)*x(i)+y(j)*y(j);
end
end
c1=griddata(x,y,asd1,xx,yy, 'linear');
c2=griddata(x,y,asd2,xx,yy, 'linear');
contourf(asd1)
contourf(asd2)
alpha(0.5)
(MWE unrelated to the map because the data is huge)