heatmap visualization of earthquake data

13 views (last 30 days)
JF
JF on 19 Oct 2011
Hello there, First question ever ! I have a list of earthquake that happened in my province along with their latitude and longitude and magnitude. What I'm trying to do is to generate a heat map from those point representing the earthquake risk in the province. Here's the code:
Data = round2(Seisme,1/facteur);
lignes = (63-44+1)*facteur; colonnes = (80-55+1)*facteur;
Resultats = zeros(lignes, colonnes);
i = 1; j = 1;
for lat = 44:1/facteur:63
for lon = 80:-1/facteur:55
M = find(Data(:,1)==lat & Data(:,2)==lon);
Resultats(i,j) = numel(M);
j = j+1;
end
j = 1;
i = i+1;
end
So basically, I'm creating a grid that acts as an indicator of the earthquake risk. It works but it ain't as pretty as I would like, I've looked at interpolation to get it to work but to no avail.
Secondly, and the main purpose of the question, is that I'm trying to plot the contour of my province (Quebec) in the background so that the user could see the earthquake risk overlapped on the province contour. I can plot the map with this command axesm('mercator','MapLatLimit',[44 63],'MapLonLimit',[-80 -55]) but I can't find a way to overlap my heat map on it.... If anyone can point me in the right direction, it would be awesome. And I know that I cheat when I create the grid and that I lose the coordinates of the quakes, but it was my first try, I'm now trying to put the two of them together. I hope I was clear enough ! Cheers

Answers (1)

Dr. Seis
Dr. Seis on 19 Oct 2011
You may be able to use this as a solution to the interpolation problem (i.e., allow you to interpolate on an irregular grid):
I imagine there should be possible solutions to overlaying an interpolated image onto a map.

Categories

Find more on Color and Styling in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!