Repository navigation
Expand file tree
/
Copy pathFun_PlotStation.m
More file actions
63 lines (59 loc) · 2.19 KB
/
Copy pathFun_PlotStation.m
File metadata and controls
63 lines (59 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
function Fun_PlotStation(loca, epicenter, mm, screenInfo)
% =========================================================================
% Plot station distribution before and after automatic screening.
%
% Input:
% loca : Remaining station locations [latitude, longitude]
% epicenter : Earthquake epicenter [latitude, longitude]
% mm : Remaining station names
% screenInfo : Output structure from Fun_ScreenStations
%
% =========================================================================
figure('Color', 'w', ...
'Position', [200, 150, 950, 700]);
hold on;
box on;
grid on;
% Plot stations remaining after screening.
plot(loca(:,2), loca(:,1), '^', ...
'MarkerSize', 12, ...
'MarkerEdgeColor', 'k', ...
'MarkerFaceColor', [0.4157 0.4157 0.9020], ...
'DisplayName', 'Remaining stations');
% Plot the epicenter.
plot(epicenter(2), epicenter(1), 'p', ...
'MarkerSize', 16, ...
'MarkerEdgeColor', 'k', ...
'MarkerFaceColor', 'w', ...
'LineWidth', 1.2, ...
'DisplayName', 'Epicenter');
% Label remaining stations.
if ~isempty(mm)
for iStation = 1:size(loca, 1)
stationName = strtrim(mm(iStation, :));
text(loca(iStation, 2), loca(iStation, 1), ...
[' ', stationName], ...
'FontSize', 9,'Color', [0.1, 0.1, 0.1],'FontName','Times New Roman');
end
end
xlabel('Longitude');
ylabel('Latitude');
% legend('Location', 'best');
axis equal;
set(gca, 'FontSize', 16,'linewidth',.8,'FontName','Times New Roman');
hold off;
%% ------------------------------------------------------------------------
% Print screening information
% -------------------------------------------------------------------------
% if nargin >= 4 && ~isempty(screenInfo)
% fprintf('\nStation screening summary:\n');
% fprintf('Initial stations : %d\n', ...
% screenInfo.NInitial);
% fprintf('Removed by distance : %d\n', ...
% screenInfo.NRemovedDistance);
% fprintf('Removed by amplitude : %d\n', ...
% screenInfo.NRemovedAmplitude);
% fprintf('Remaining stations : %d\n', ...
% screenInfo.NFinal);
% end
end