-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfcsscatter.m
More file actions
53 lines (43 loc) · 1.08 KB
/
fcsscatter.m
File metadata and controls
53 lines (43 loc) · 1.08 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
function h = fcsscatter( data, channel, scaling)
%fcsplot PLOT FCS SINGLE WELL DATA
% fcsplot( data ) plot fsc and ssc channels
% fcsplot( data, channel ) plot specific channels
%
% created by BH 20120714
if nargin == 1
channel = {'fsc', 'ssc'};
scaling = 'lin';
elseif nargin == 2
scaling = 'lin';
end
% define scale
if strcmp(scaling, 'lin')
scafunc = @(x) x;
elseif strcmp(scaling, 'log10')
scafunc = @(x) log10(x);
elseif strcmp(scaling, 'log2')
scafunc = @(x) log2(x);
elseif strcmp(scaling, 'log')
scafunc = @(x) log10(x);
else
scafunc = @(x) x;
end
% data extract
data_x = scafunc(data.(channel{1}));
data_y = scafunc(data.(channel{2}));
% plot
if length(channel) == 2
h= plot(data_x, data_y, '.', 'markersize', 1);
else
data_z = scafunc(data.(channel{3}));
h= plot3(data_x, data_y, data_z, '.', 'markersize', 1);
end
% xlabel([channel{1}, '\_', scaling], 'fontsize', Fontsize_cal)
% ylabel([channel{2}, '\_', scaling], 'fontsize', Fontsize_cal)
if length(channel) == 3
zlabel([channel{3}, '\_', scaling])
end
box on
grid on
view(2)
end