-
Notifications
You must be signed in to change notification settings - Fork 0
/
drawAllNeuronsSide.m
86 lines (59 loc) · 1.54 KB
/
drawAllNeuronsSide.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
78
79
80
81
82
83
84
85
86
% Draw depth histograms for all RGCs
close all, clear all
r = RGCclass(0);
r.lazyLoad();
nColumns = 5;
nRows = 3;
nameList = {};
pHandles = [];
figFile = {};
figHandle = [];
minZ = 0;
maxZ = 0;
for i = 1:numel(r.RGCuniqueNames)
showType = r.RGCuniqueNames{i};
ctr = 1;
idx = find(ismember(r.RGCtypeName,{showType}));
for pageOfs = 1:(nColumns*nRows):numel(idx)
figHandle(end+1) = figure();
figFile{end+1} = sprintf('FIGS/%s-stratification-depth-%d.eps', ...
showType, pageOfs);
for k = 1:min(nColumns*nRows,numel(idx)-pageOfs+1)
subplot(nRows,nColumns,k)
subIdx = idx(k + pageOfs - 1);
[pHand,pMinZ,pMaxZ] = r.RGC(subIdx).plotStratification(true);
pHandles(end+1) = gca;
% set(gca,'ydir','reverse')
title(num2str(ctr))
set(gca,'fontsize',12)
box off
if(k == 1)
xlabel([])
ylabel('Z-depth (\mum)','fontsize',12)
else
xlabel([])
ylabel([])
set(gca,'ytick',[])
end
set(gca,'xtick',[])
set(gca,'ydir','reverse')
set(gca,'xcolor',get(gcf,'color'))
%a = axis();
%minZ = min(a(3),minZ);
%maxZ = max(a(4),maxZ);
minZ = min(minZ,pMinZ);
maxZ = max(maxZ,pMaxZ);
ctr = ctr + 1;
end
end
end
for i = 1:numel(pHandles)
axes(pHandles(i))
a = axis;
a(3:4) = [minZ maxZ];
axis(a);
end
for i = 1:numel(figHandle)
set(0,'currentfigure',figHandle(i))
printA4(figFile{i})
end