-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlot_cpRNFL_RP.m
More file actions
122 lines (102 loc) · 3.53 KB
/
Plot_cpRNFL_RP.m
File metadata and controls
122 lines (102 loc) · 3.53 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
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
function Plot_cpRNFL_RP(save_fig)
%% move to result folder
% TamagawaPath('rp');
%% Load OCT normal dstribution file
% normal distribution
DataDir = '/biac4/wandell/biac2/wandell/data/DWI-Tamagawa-Japan2/RP';
if exist(DataDir,'dir')>0,
% normal data
load(fullfile(DataDir,'D.mat'));
load(fullfile(DataDir,'M.mat'));
% subjects data
load(fullfile(DataDir,'RP_DiscOCT.mat'));
else
% normal data
load /Users/shumpei/Documents/MATLAB/git/RP/D.mat
load /Users/shumpei/Documents/MATLAB/git/RP/M.mat
% subjects data
load /Users/shumpei/Documents/MATLAB/git/RP/RP_DiscOCT.mat
end
%% Disc plot
% add normal distribution
m = D.val;
sd = D.sd;
%% L-eye
h =mrvNewGraphWin; hold on;
% left eye
errorbar2(1:5,[m(1),m(4),m(5),m(3),m(2)],...
[sd(1),sd(4),sd(5),sd(3),sd(2)]*2,1,'color',[0.9 0.9 0.9],...
'linewidth',10);
errorbar2(1:5,[m(1),m(4),m(5),m(3),m(2)],[sd(1),sd(4),sd(5),sd(3),sd(2)],1,'color',[0.8 0.80 0.8],...
'linewidth',10);
% add individual plot
plot(1, AveRNFLthicknessL(:),'o','linewidth',2)
plot(2, LRNFLnasal,'o','linewidth',2)
plot(3, LRNFLquadrantsInferior,'o','linewidth',2)
plot(4, LRNFLquadrantsSuperior,'o','linewidth',2)
plot(5, LRNFLTemporal,'o','linewidth',2)
% Right eye
% plot(6, AveRNFLthicknessR(:),'o','linewidth',2)
% h = gca;
% x axis
set(gca,'xlim',[0,6],'xtick',[1:5])
set(gca,'XTickLabel',{'L-ave','Nasal','Inf','Sup','Temp'},'tickdir','out', 'box','off')
% y axis
set(gca,'ytick',[40:70:180])
% % legend
% lh = legend('Healthy','RP');
% set(lh,'box','off','EdgeColor','none')
title('L-peripapillary RNFL thinckness','fontsize',14)
if save_fig,
saveas(gcf,'L_disk_oct.png')
saveas(gcf,'L_disk_oct.eps','psc2');
end
%% R-eye
mrvNewGraphWin; hold on;
% left eye
errorbar2(1:5,[m(1),m(4),m(5),m(3),m(2)],...
[sd(1),sd(4),sd(5),sd(3),sd(2)]*2,1,'color',[0.9 0.9 0.9],...
'linewidth',10);
errorbar2(1:5,[m(1),m(4),m(5),m(3),m(2)],[sd(1),sd(4),sd(5),sd(3),sd(2)],1,'color',[0.8 0.80 0.8],...
'linewidth',10);
% add individual plot
plot(1, AveRNFLthicknessR,'o','linewidth',2)
plot(2, RRNFLnasal,'o','linewidth',2)
plot(3, RRNFLquadrantsInferior,'o','linewidth',2)
plot(4, RRNFLquadrantsSuperior,'o','linewidth',2)
plot(5, RRNFLTemporal,'o','linewidth',2)
% x axis
set(gca,'xlim',[0,6],'xtick',[1:5])
set(gca,'XTickLabel',{'L-ave','Nasal','Inf','Sup','Temp'},'tickdir','out', 'box','off')
% y axis
set(gca,'ytick',[40:70:180])
title('R-peripapillary RNFL thinckness','fontsize',14)
if save_fig,
saveas(gcf,'R_disk_oct.png')
saveas(gcf,'R_disk_oct.eps','psc2');
end
%% Both-eye
mrvNewGraphWin; hold on;
% left eye
errorbar2(1:5,[m(1),m(4),m(5),m(3),m(2)],...
[sd(1),sd(4),sd(5),sd(3),sd(2)]*2,1,'color',[0.9 0.9 0.9],...
'linewidth',10);
errorbar2(1:5,[m(1),m(4),m(5),m(3),m(2)],[sd(1),sd(4),sd(5),sd(3),sd(2)],1,'color',[0.8 0.80 0.8],...
'linewidth',10);
% add individual plot
plot(1, mean([AveRNFLthicknessR,AveRNFLthicknessL],2),'o','linewidth',2)
plot(2, mean([RRNFLnasal,LRNFLnasal],2),'o','linewidth',2)
plot(3, mean([LRNFLquadrantsInferior,RRNFLquadrantsInferior],2),'o','linewidth',2)
plot(4, mean([RRNFLquadrantsSuperior, LRNFLquadrantsSuperior],2),'o','linewidth',2)
plot(5, mean([RRNFLTemporal,LRNFLTemporal],2),'o','linewidth',2)
% x axis
set(gca,'xlim',[0,6],'xtick',[1:5])
set(gca,'XTickLabel',{'Ave','Nasal','Inf','Sup','Temp'},'tickdir','out', 'box','off')
% y axis
set(gca,'ytick',[40,180],'ylim',[40,180])
title('Peripapillary RNFL thinckness','fontsize',14)
%save
if save_fig,
saveas(gcf,'B_disk_oct.png')
saveas(gcf,'B_disk_oct.eps','psc2');
end