-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtruerefplot.m
More file actions
130 lines (129 loc) · 4.71 KB
/
Copy pathtruerefplot.m
File metadata and controls
130 lines (129 loc) · 4.71 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
123
124
125
126
127
128
129
130
function truerefplot(varargin)
% TRUEREFPLOT Called by trueref to plot data
%
% Copyright 2004, Zhang Jiang
hFigTrueref = findall(0,'Tag','trueref_Fig');
hAxes = findall(hFigTrueref,'Tag','trueref_Axes');
if isappdata(hFigTrueref,'data')
data = getappdata(hFigTrueref,'data');
else
return;
end
% --- determine which curve to plot: all, ref, pos or neg
if nargin == 0
plot_str = 'All';
else
plot_str = varargin{1};
end
cla(hAxes);
% --- plot
switch plot_str
case 'All'
% --- plot reflecitivity
if ~isempty(data.ref)
hLineRef = [];
for iLine = 1:length(data.ref)
hLineRef(iLine) = line('Parent',hAxes,...
'XData',data.ref{iLine}(:,1),...
'YData',data.ref{iLine}(:,2),...
'Tag',['reflectivity',num2str(iLine)]);
setappdata(hLineRef(iLine),'ydataError',data.ref{iLine}(:,3));
end
set(hLineRef,...
'Color','k',...
'LineStyle','-',...
'Marker','o',...
'MarkerSize',3,...
'MarkerFaceColor','m');
end
% --- plot positive longitudinal diffuse
if ~isempty(data.pos)
hLinePos = [];
for iLine = 1:length(data.pos)
hLinePos(iLine) = line('Parent',hAxes,...
'XData',data.pos{iLine}(:,1),...
'YData',data.pos{iLine}(:,2),...
'Tag',['positiveLongDiffuse',num2str(iLine)]);
setappdata(hLinePos(iLine),'ydataError',data.pos{iLine}(:,3));
end
set(hLinePos,...
'Color','b',...
'LineStyle','-',...
'Marker','o',...
'MarkerSize',3,...
'MarkerFaceColor','m');
end
% --- plot negative longitudinal diffuse
if ~isempty(data.neg)
hLineNeg = [];
for iLine = 1:length(data.neg)
hLineNeg(iLine) = line('Parent',hAxes,...
'XData',data.neg{iLine}(:,1),...
'YData',data.neg{iLine}(:,2),...
'Tag',['negativeLongDiffuse',num2str(iLine)]);
setappdata(hLineNeg(iLine),'ydataError',data.neg{iLine}(:,3));
end
set(hLineNeg,...
'Color','g',...
'LineStyle','-',...
'Marker','o',...
'MarkerSize',3,...
'MarkerFaceColor','m');
end
case 'Ref'
% --- plot reflecitivity
if ~isempty(data.ref)
hLineRef = [];
for iLine = 1:length(data.ref)
hLineRef(iLine) = line('Parent',hAxes,...
'XData',data.ref{iLine}(:,1),...
'YData',data.ref{iLine}(:,2),...
'Tag',['reflectivity',num2str(iLine)]);
setappdata(hLineRef(iLine),'ydataError',data.ref{iLine}(:,3));
end
set(hLineRef,...
'Color','k',...
'LineStyle','-',...
'Marker','o',...
'MarkerSize',3,...
'MarkerFaceColor','m');
end
case 'Pos'
% --- plot positive longitudinal diffuse
if ~isempty(data.pos)
hLinePos = [];
for iLine = 1:length(data.pos)
hLinePos(iLine) = line('Parent',hAxes,...
'XData',data.pos{iLine}(:,1),...
'YData',data.pos{iLine}(:,2),...
'Tag',['positiveLongDiffuse',num2str(iLine)]);
setappdata(hLinePos(iLine),'ydataError',data.pos{iLine}(:,3));
end
set(hLinePos,...
'Color','b',...
'LineStyle','-',...
'Marker','o',...
'MarkerSize',3,...
'MarkerFaceColor','m');
end
case 'Neg'
% --- plot negative longitudinal diffuse
if ~isempty(data.neg)
hLineNeg = [];
for iLine = 1:length(data.neg)
hLineNeg(iLine) = line('Parent',hAxes,...
'XData',data.neg{iLine}(:,1),...
'YData',data.neg{iLine}(:,2),...
'Tag',['negativeLongDiffuse',num2str(iLine)]);
setappdata(hLineNeg(iLine),'ydataError',data.neg{iLine}(:,3));
end
set(hLineNeg,...
'Color','g',...
'LineStyle','-',...
'Marker','o',...
'MarkerSize',3,...
'MarkerFaceColor','m');
end
end
resettoolbar(hFigTrueref);
curvelegend(hFigTrueref);