1 |
enderton |
1.1 |
% DiagPlotMakePlot is called by DiagPlot and cannot be used seperately. |
2 |
|
|
|
3 |
|
|
|
4 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
5 |
|
|
% Make plot % |
6 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
7 |
|
|
if isequal(cmp,'Dif') |
8 |
|
|
plotdata = data{inrow}{1} - data{inrow}{2}; |
9 |
|
|
else |
10 |
|
|
plotdata = data{inrow}{incol}; |
11 |
|
|
end |
12 |
|
|
|
13 |
|
|
|
14 |
|
|
% Make gridded plot. This should be fixed up to allow for non-constant |
15 |
|
|
% height intervals, imagesc makes everything equally spaced in the vertical |
16 |
|
|
% (and in the horizontal for that matter). |
17 |
|
|
if isequal(pst,'Grd') |
18 |
|
|
if isCS |
19 |
enderton |
1.4 |
merccube_mod(xax{inrow}{incol},yax{inrow}{incol},plotdata); |
20 |
enderton |
1.1 |
else |
21 |
|
|
imagesc(xax{inrow}{incol},yax{inrow}{incol},plotdata); |
22 |
|
|
end |
23 |
|
|
|
24 |
|
|
% Make interpolated plot. |
25 |
|
|
elseif isequal(pst,'Int') |
26 |
|
|
if isCS |
27 |
enderton |
1.4 |
merccube_mod(xax{inrow}{incol},yax{inrow}{incol},plotdata); |
28 |
enderton |
1.1 |
shading interp; |
29 |
|
|
else |
30 |
|
|
pcolor(xax{inrow}{incol},yax{inrow}{incol},plotdata); |
31 |
|
|
shading interp; |
32 |
|
|
end |
33 |
|
|
|
34 |
|
|
% Make contour (non-filled) plot. Let MATLAB determine the contour |
35 |
|
|
% intervals on a differencing plot. |
36 |
|
|
elseif isequal(pst,'Con') |
37 |
enderton |
1.6 |
if isequal(cmap,'solid-dashed') |
38 |
|
|
for ii = 1:3 |
39 |
|
|
cint = contint; lw = linewidth; |
40 |
|
|
if ii == 1, cint = cint(cint>0); lst = '-'; end |
41 |
|
|
if ii == 2, cint = cint(cint<0); lst = '--'; end |
42 |
|
|
if ii == 3, cint = [0,0]; lst = '-'; lw = 2.*lw; end |
43 |
enderton |
1.7 |
try [cs,h] = contour(xax{inrow}{incol},yax{inrow}{incol},... |
44 |
|
|
plotdata,cint,['k',lst]); |
45 |
|
|
set(h,'linewidth',lw); |
46 |
|
|
if UseConLabel |
47 |
|
|
clabel(cs,h,'fontsize',fs_clabel,'rotation',0); |
48 |
|
|
end |
49 |
|
|
catch, end |
50 |
enderton |
1.6 |
end |
51 |
|
|
else |
52 |
|
|
[cs,h] = contour(xax{inrow}{incol},yax{inrow}{incol},plotdata,contint); |
53 |
|
|
set(h,'linewidth',linewidth); |
54 |
|
|
if UseConLabel |
55 |
|
|
clabel(cs,h,'fontsize',fs_clabel,'rotation',0); |
56 |
|
|
end |
57 |
enderton |
1.1 |
end |
58 |
|
|
|
59 |
enderton |
1.6 |
|
60 |
enderton |
1.1 |
% Make contour (filled) plot. Let MATLAB determine the contour |
61 |
|
|
% intervals on a differencing plot. |
62 |
|
|
elseif isequal(pst,'Cnf') |
63 |
enderton |
1.3 |
try [cs,h] = contourf(xax{inrow}{incol},yax{inrow}{incol},plotdata,contint); |
64 |
|
|
catch [cs,h] = contourf(xax{inrow}{incol},yax{inrow}{incol},plotdata); end |
65 |
enderton |
1.1 |
if UseCnfLabel |
66 |
|
|
clabel(cs,h,'fontsize',fs_clabel,'rotation',0); |
67 |
|
|
end |
68 |
|
|
|
69 |
|
|
% Make line plot. If this is an overlaying comparison, cycle through the |
70 |
|
|
% appropriate data of which to overlay. |
71 |
|
|
elseif isequal(pst,'Lin') |
72 |
|
|
if ismember(cmp,{'OvC','OvE','OvF'}) |
73 |
enderton |
1.2 |
for intrl = 1:ntrl |
74 |
enderton |
1.5 |
plot(xax{inrow}{intrl},data{inrow}{intrl},... |
75 |
|
|
linecolors{intrl},'linewidth',linewidth); |
76 |
enderton |
1.1 |
end |
77 |
|
|
else |
78 |
|
|
plot(xax{inrow}{incol},plotdata,linecolors{1},'linewidth',linewidth); |
79 |
|
|
end |
80 |
|
|
|
81 |
|
|
% Unknown plot style encountered. |
82 |
|
|
else |
83 |
|
|
error(['Oh dear! Undefined PlotStyle: ',pst]); |
84 |
|
|
end |