-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathfigure51.m
77 lines (63 loc) · 2.76 KB
/
figure51.m
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
function figure51
global dPARAMS dHANDLES p
figure(dHANDLES.RMSvPPfig);clf
dHANDLES.h51 = gca;
if p.specploton && p.loadMSP
plot(dHANDLES.h51,dPARAMS.transfRMSall,dPARAMS.xmppAll,'o','MarkerSize',...
p.sizeBack,'MarkerEdgeColor',[.7,.7,.7],'UserData',dPARAMS.clickTimes)
title(dHANDLES.h51,['Based on total of ',num2str(length(dPARAMS.xmppAll)),' clicks']);
if (p.threshRMS > 0)
%%% why is x/ytline used for different variables?
if p.threshPP > 0
xtline = [p.threshRMS,p.threshRMS];
ytline = [ min(dPARAMS.xmppAll),p.threshPP];
else
xtline = [p.threshRMS,p.threshRMS];
ytline = [ min(dPARAMS.xmppAll),max(dPARAMS.xmppAll)];
end
hold(dHANDLES.h51,'on');
plot(dHANDLES.h51,xtline,ytline,'r')
hold(dHANDLES.h51,'off');
end
end
% Plot PP versus RMS Plot for this session
hold(dHANDLES.h51, 'on')
dHANDLES.h51.ColorOrderIndex = 1;
plot(dHANDLES.h51,dPARAMS.transfRMS,dPARAMS.xmpp,'.','MarkerSize',p.sizePoints,'UserData',dPARAMS.t)% true ones in blue
if p.threshPP > 0 && isfield(dPARAMS,'plotaxes') % why doesn't plot axes just either exist or not??? messy.
xtline = [p.threshRMS,p.threshRMS];
ytline = [dPARAMS.plotaxes.minPP,p.threshPP];
elseif p.threshPP > 0
xtline = [p.threshRMS,p.threshRMS];
ytline = [ min(dPARAMS.xmpp),p.threshPP]; % should default to same axes as PP timeseries
else
xtline = [p.threshRMS,p.threshRMS];
ytline = [min(dPARAMS.xmpp),max(dPARAMS.xmpp)];
end
plot(dHANDLES.h51,xtline,ytline,'r')
if dPARAMS.ff2 % false in red
plot(dHANDLES.h51,dPARAMS.transfRMS(dPARAMS.K2),dPARAMS.xmpp(dPARAMS.K2),...
'r.','MarkerSize',p.sizePoints,'UserData',dPARAMS.t(dPARAMS.K2))
end
if dPARAMS.ff3 % ID'd in associated color
for iC2 = 1:length(dPARAMS.specIDs) % set colors
thisIDset = dPARAMS.spCodeSet ==dPARAMS.specIDs(iC2);
hPP = plot(dHANDLES.h51,dPARAMS.transfRMS(dPARAMS.K3(thisIDset)),...
dPARAMS.xmpp(dPARAMS.K3(thisIDset)),'.',...
'MarkerSize',p.sizePoints,'UserData',dPARAMS.t(dPARAMS.K3(thisIDset)));
set(hPP,'Color',p.colorTab(dPARAMS.specIDs(iC2),:))
end
end
hold(dHANDLES.h51, 'off')
xlabel(dHANDLES.h51,'Transformed Received Level (dB_r_m_s re 1\muPa)')
ylabel(dHANDLES.h51,'Received Level (dB_p_p re 1\muPa)')
xlim(dHANDLES.h51,[p.rmsLow,p.rmsHi])
ylim(dHANDLES.h51,[p.rlLow,p.rlHi])
% if you have items brushed in yellow, highlight those on each plot
if ~isempty(dPARAMS.yell) && ~isempty(dPARAMS.csnJ)
hold(dHANDLES.h51,'on')
plot(dHANDLES.h51,dPARAMS.transfRMS(dPARAMS.yell),dPARAMS.xmpp(dPARAMS.yell),'ko',...
'MarkerSize',p.sizeBack,...
'LineWidth',2,'UserData',dPARAMS.clickTimes(dPARAMS.K2))
hold(dHANDLES.h51,'off')
end