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

Annotation of /MITgcm_contrib/enderton/Diagnostics/DiagPlotMisc.m

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


Revision 1.3 - (hide annotations) (download)
Mon Feb 7 16:04:14 2005 UTC (20 years, 5 months ago) by enderton
Branch: MAIN
Changes since 1.2: +7 -6 lines
 o Fixed resetting of x-axis when plotting monitor statistics.

1 enderton 1.1 % DiagPlotMisc is called by DiagPlot and cannot be used seperately.
2    
3    
4     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5     % Apply desired colorbar, contour label, tick labels, box, grid %
6     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7    
8    
9     % Add colorbar, except for line plots. When the colorbar is placed, reset
10     % the colorbar and axes positions on the figure to match desired settings.
11     % Colorbar can be turned off as desired.
12     if UseColorbar
13     if ~isequal(pst,'Lin')
14     h=colorbar;
15     cxi = xi+dx-dxcb;
16     set(h,'position',[cxi,yi,dxcb,dy]);
17     set(h,'fontsize',fs_colorbar);
18     set(gca,'position',[xi,yi,dx-dxcb-dxcbg,dy]);
19     end
20     end
21    
22     % Reform tick labels. It the PlotStyle (pst) is 'Lin', do nothing with the
23     % y-axis label as is it now a dependent variable.
24     if UseNiceTickLabels
25     if isequal(pltslc{inrow}{incol}(1:3),'lon')
26 enderton 1.3 xtick = lontick; xticklabel = lonticklabel;
27     set(gca,'xtick',xtick); set(gca,'xticklabel',xticklabel);
28 enderton 1.1 elseif isequal(pltslc{inrow}{incol}(1:3),'lat')
29 enderton 1.3 xtick = lattick; xticklabel = latticklabel;
30     set(gca,'xtick',xtick); set(gca,'xticklabel',xticklabel);
31 enderton 1.1 elseif isequal(pltslc{inrow}{incol}(1:3),'tim')
32 enderton 1.3 % xtick = timtick; xticklabel = timticklabel;
33     % set(gca,'xtick',xtick); set(gca,'xticklabel',xticklabel);
34 enderton 1.1 end
35 enderton 1.3
36 enderton 1.1 if ~isequal(pltslc{inrow}{incol}(4:6),'fld')
37     if isequal(pltslc{inrow}{incol}(4:6),'lat')
38     ytick = lattick; yticklabel = latticklabel;
39     elseif isequal(pltslc{inrow}{incol}(4:6),'hgt')
40     eval(['ytick = vertick',flu,';']);
41     eval(['yticklabel = verticklabel',flu,';']);
42     end
43     set(gca,'ytick',ytick);
44     set(gca,'yticklabel',yticklabel);
45     end
46     end
47    
48     % Add box and grid as desired.
49     eval(['box ' ,Box ,';']);
50     eval(['grid ',Grid,';']);
51    
52     % Add legend if comparison is set to one of the overlay settings: 'OvE' or
53     % 'OvC'. If the 'UseLegend' flag is turned on but the comparison type is
54     % not one of these overlay settings, nothing is done.
55     if UseLegend && ismember(cmp,{'OvC','OvE','OvF'})
56     legendstr = '';
57 enderton 1.2 for intrl = 1:ntrl
58     if isequal(cmp,'OvE'), tempname = page{inrow}{intrl}{itrl};
59     elseif isequal(cmp,'OvC'), tempname = page{inrow}{intrl}{iavg};
60     elseif isequal(cmp,'OvF'), tempname = page{inrow}{intrl}{ifln}; end
61 enderton 1.1 tempname = AddSlashesBeforeUnderscores(tempname);
62     legendstr = [legendstr,'''',tempname,''','];
63     end
64     eval(['legend(',legendstr,num2str(LegendPlacement),')']);
65     end

  ViewVC Help
Powered by ViewVC 1.1.22