-
Notifications
You must be signed in to change notification settings - Fork 1
/
M2S_plotDelta_matchedSets.m
48 lines (39 loc) · 1.5 KB
/
M2S_plotDelta_matchedSets.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
%% This is a plot of results of matching. Can be used with matched datasets
%s with multiple or unique matches.
% Input data are two matrices with [RT, MZ, FI} of reference and target.
% The number of rows must be the same in both.
function M2S_plotDelta_matchedSets(refMatched,targetMatched,Xsymbol,plotRow)
if nargin == 2
%createFigOrNot = 1;
M2S_figureH(0.8,0.9)
Xsymbol = '.k';
plotRow = 2;
elseif nargin == 3
plotRow = 2;
end
subplot(plotRow,3,1); hold on
plot(refMatched(:,1),targetMatched(:,1)-refMatched(:,1), Xsymbol)
grid on, axis tight
xlabel('RT reference'), ylabel('RTdist')
subplot(plotRow,3,2); hold on
plot(refMatched(:,2),targetMatched(:,2)-refMatched(:,2), Xsymbol)
grid on, axis tight
xlabel('MZ reference'), ylabel('MZdist')
subplot(plotRow,3,3); hold on
plot(log10(refMatched(:,3)),log10(targetMatched(:,3))-log10(refMatched(:,3)), Xsymbol)
grid on, axis tight
xlabel('log10 FI reference'), ylabel('log10 FIdist')
if plotRow == 2
subplot(plotRow,3,4); hold on
plot(refMatched(:,1),targetMatched(:,1), Xsymbol)
grid on, axis tight
title('RT'), xlabel('RT reference'), ylabel('RT target')
subplot(plotRow,3,5); hold on
plot(refMatched(:,2),targetMatched(:,2), Xsymbol)
grid on, axis tight
title('MZ'), xlabel('MZ reference'), ylabel('MZ target')
subplot(plotRow,3,6); hold on
plot(log10(refMatched(:,3)),log10(targetMatched(:,3)), Xsymbol)
grid on, axis tight
title('log10 FI'), xlabel('log10 FI reference'), ylabel('log10 FI target')
end