/[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.2 - (show annotations) (download)
Wed Feb 2 15:38:21 2005 UTC (20 years, 5 months ago) by enderton
Branch: MAIN
Changes since 1.1: +2 -2 lines
 o Added plotting options for actual temperature 'ActT' and moist potential temperature 'MoiPTc', though the later is calculated in a crude way.  Also changed 'exp' variables internally to 'trl' to avoid overriding exp() function.  Hopefully I got them all.

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

  ViewVC Help
Powered by ViewVC 1.1.22