-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathplotFlux.m
74 lines (72 loc) · 1.84 KB
/
plotFlux.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
function C=plotFlux(sample,varargin)
%%----------------------------------------
%% plot the raw data
%%----------------------------------------
%
opt = 1;
if (numel(varargin)>0)
opt = varargin{1};
end
if (ishandle(opt))
close(opt);
end
h1=figure(opt);
set(h1,'Position',[200,300,1800,900]);
%
C = getPmts('Y:\ctrl13\csv');
C.samp = sample;
C.D = readtable([C.csv,'\',C.samp,'.csv']);
C.batch = unique(C.D.batch);
%
annotation('textbox',[0,0.95,1,0.05],...
'String',C.samp,'EdgeColor','none',...
'HorizontalAlignment','center','FontSize',12);
%
P.axis = [min(C.batch)-1 max(C.batch)+1 -5 5];
for m=2:7
subplot(2,3,m-1);
hold on;
plotOneMarker(C,m,P);
end
shg
%
end
function plotOneMarker(C,m,P)
%
D=C.D;
marks = {'o','^','s','<','>','d'};
color = colormap(lines);
batch = unique(D.batch);
%
title(C.markers.marker{m});
%
for t=1:numel(C.tissues.ntissue)
cores = C.cores(C.cores.ntissue==t,:);
for i=1:numel(cores.core)
c = cores.core(i);
ix = D.nmarker==m & D.core==c;
d = D(ix,:);
d = sortrows(d,'batch');
%
if (numel(d)==0)
continue
end
%
clr = color(t,:);
p(t) = plot(d.batch,log(d.f0),'-',...
'MarkerSize',5, 'MarkerFaceColor',clr,...
'MarkerEdgeColor',clr*0.4,...
'Marker',marks{t},'Color',clr);
end
end
%
axis(P.axis);
box on
grid on
xlabel('batch');
ylabel('log(flux)');
xticks((min(batch)-1:max(batch)+1));
yticks(-5:5);
legend(p, C.tissues.tissue);
%
end