/[MITgcm]/MITgcm_contrib/enderton/Diagnostics/DiagPlotMakePlot.m
ViewVC logotype

Contents of /MITgcm_contrib/enderton/Diagnostics/DiagPlotMakePlot.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (show annotations) (download)
Mon Sep 5 18:50:15 2005 UTC (19 years, 10 months ago) by enderton
Branch: MAIN
Changes since 1.4: +2 -1 lines
A few minor changes and comments added.

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 merccube_mod(xax{inrow}{incol},yax{inrow}{incol},plotdata);
20 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 merccube_mod(xax{inrow}{incol},yax{inrow}{incol},plotdata);
28 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 try [cs,h] = contour(xax{inrow}{incol},yax{inrow}{incol},plotdata,contint);
38 catch [cs,h] = contour(xax{inrow}{incol},yax{inrow}{incol},plotdata); end
39 set(h,'linewidth',linewidth);
40 if UseConLabel
41 clabel(cs,h,'fontsize',fs_clabel,'rotation',0);
42 end
43
44 % Make contour (filled) plot. Let MATLAB determine the contour
45 % intervals on a differencing plot.
46 elseif isequal(pst,'Cnf')
47 try [cs,h] = contourf(xax{inrow}{incol},yax{inrow}{incol},plotdata,contint);
48 catch [cs,h] = contourf(xax{inrow}{incol},yax{inrow}{incol},plotdata); end
49 if UseCnfLabel
50 clabel(cs,h,'fontsize',fs_clabel,'rotation',0);
51 end
52
53 % Make line plot. If this is an overlaying comparison, cycle through the
54 % appropriate data of which to overlay.
55 elseif isequal(pst,'Lin')
56 if ismember(cmp,{'OvC','OvE','OvF'})
57 for intrl = 1:ntrl
58 plot(xax{inrow}{intrl},data{inrow}{intrl},...
59 linecolors{intrl},'linewidth',linewidth);
60 end
61 else
62 plot(xax{inrow}{incol},plotdata,linecolors{1},'linewidth',linewidth);
63 end
64
65 % Unknown plot style encountered.
66 else
67 error(['Oh dear! Undefined PlotStyle: ',pst]);
68 end

  ViewVC Help
Powered by ViewVC 1.1.22