Events example

Retrieve, then plot a cross-section of earthquakes.

The following code retrieves events for a rectangular cross-section that depicts a down-going slab. It then converts the Magnitudes into sizes suitable for plotting. It then plots the events, allowing for depths to be positive downard. Finally, it superimposes the locations of the ocean trench and of the Japanese mainland.

Of note: items, such as PrimaryMagnitudeValue and PrimaryLongitude for all events can be accessed at once by using the square brackets.

ev = irisFetch.Events('minimumMagnitude',4.5,'maximumDepth',200,'boxcoordinates',[38,39,138,146]);

% plot the location of each quake, scaled according to event Magnitude
dotSizes = 2.5 .^ ([ev.PrimaryMagnitudeValue]-2);
scatter([ev.PrimaryLongitude],[ev.PrimaryDepth],dotSizes ,'filled');

% Make the depth positive in the downward direction

hold on

% plot approximate location of Japan mainland
plot([139.5 141.5],[0.1,0.1],'gv-','linewidth',3);

% plot approximate location of the ocean trench
plot(144,0,'kv','linewidth',2,'markersize',8); %Trench

legend('Earthquakes' , 'Japan' , 'Trench' , 'location' , 'Best')
hold off