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

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

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

revision 1.1 by enderton, Mon Jan 31 15:43:27 2005 UTC revision 1.7 by enderton, Mon Sep 12 20:13:21 2005 UTC
# Line 5  Line 5 
5  %      Apply desired colorbar, contour label, tick labels, box, grid      %  %      Apply desired colorbar, contour label, tick labels, box, grid      %
6  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7    
8    % Center caxis around 0
9    if cmapcenter0
10        caxis([-max(abs(caxis)),max(abs(caxis))]);
11    end
12    
13    % Apply desired colormap.
14    if ~isequal(cmap,'')
15        if isequal(cmap,'solid-dashed')
16            % Accounted for in DiagPlotMakePlot.
17        elseif isequal(cmap,'black')
18            colormap([0,0,0]);
19        elseif isequal(cmap,'bwr')
20            load('BWR_6.mat');
21            colormap(bwr);
22        else
23            colormap(cmap);
24        end
25    end
26    
27  % Add colorbar, except for line plots.  When the colorbar is placed, reset  % Add colorbar, except for line plots.  When the colorbar is placed, reset
28  % the colorbar and axes positions on the figure to match desired settings.  % the colorbar and axes positions on the figure to match desired settings.
# Line 23  end Line 41  end
41  % y-axis label as is it now a dependent variable.  % y-axis label as is it now a dependent variable.
42  if UseNiceTickLabels  if UseNiceTickLabels
43      if isequal(pltslc{inrow}{incol}(1:3),'lon')      if isequal(pltslc{inrow}{incol}(1:3),'lon')
44          xtick = lontick;  xticklabel = lonticklabel;          xtick = fac.*lontick; xticklabel = lonticklabel;
45            set(gca,'xtick',xtick); set(gca,'xticklabel',xticklabel);      
46      elseif isequal(pltslc{inrow}{incol}(1:3),'lat')      elseif isequal(pltslc{inrow}{incol}(1:3),'lat')
47          xtick = lattick;  xticklabel = latticklabel;          xtick = fac.*lattick; xticklabel = latticklabel;
48            set(gca,'xtick',xtick); set(gca,'xticklabel',xticklabel);  
49      elseif isequal(pltslc{inrow}{incol}(1:3),'tim')      elseif isequal(pltslc{inrow}{incol}(1:3),'tim')
50          xtick = timtick;  xticklabel = timticklabel;          % xtick = timtick; xticklabel = timticklabel;
51          a=1;%error('Fix me!!!')          % set(gca,'xtick',xtick); set(gca,'xticklabel',xticklabel);  
52      end      end
53      set(gca,'xtick',xtick);  
     set(gca,'xticklabel',xticklabel);  
54      if ~isequal(pltslc{inrow}{incol}(4:6),'fld')      if ~isequal(pltslc{inrow}{incol}(4:6),'fld')
55          if isequal(pltslc{inrow}{incol}(4:6),'lat')          if isequal(pltslc{inrow}{incol}(4:6),'lat')
56              ytick = lattick;  yticklabel = latticklabel;              ytick = fac.*lattick;  yticklabel = latticklabel;
57          elseif isequal(pltslc{inrow}{incol}(4:6),'hgt')          elseif isequal(pltslc{inrow}{incol}(4:6),'hgt')
58              eval(['ytick = vertick',flu,';']);              eval(['ytick = vertick',flu,';']);
59              eval(['yticklabel = verticklabel',flu,';']);              eval(['yticklabel = verticklabel',flu,';']);
# Line 53  eval(['grid ',Grid,';']); Line 72  eval(['grid ',Grid,';']);
72  % not one of these overlay settings, nothing is done.  % not one of these overlay settings, nothing is done.
73  if UseLegend && ismember(cmp,{'OvC','OvE','OvF'})  if UseLegend && ismember(cmp,{'OvC','OvE','OvF'})
74      legendstr = '';      legendstr = '';
75      for inexp = 1:nexp      for intrl = 1:ntrl
76          if     isequal(cmp,'OvE'), tempname = page{inrow}{inexp}{iexp};          if     isequal(cmp,'OvE'), tempname = page{inrow}{intrl}{itrl};
77          elseif isequal(cmp,'OvC'), tempname = page{inrow}{inexp}{iavg};          elseif isequal(cmp,'OvC'), tempname = page{inrow}{intrl}{iavg};
78          elseif isequal(cmp,'OvF'), tempname = page{inrow}{inexp}{ifln}; end          elseif isequal(cmp,'OvF'), tempname = page{inrow}{intrl}{ifln}; end
79          tempname = AddSlashesBeforeUnderscores(tempname);          tempname = AddSlashesBeforeUnderscores(tempname);
80          legendstr = [legendstr,'''',tempname,''','];          legendstr = [legendstr,'''',tempname,''','];
81      end      end
82      eval(['legend(',legendstr,num2str(LegendPlacement),')']);      eval(['legend(',legendstr,num2str(LegendPlacement),')']);
83  end  end
84    
85    % Add coast as appropriate.
86    if Coast
87        %m_proj('Mercator','lat',90,'lon',[-180,177.5]);
88        m_proj('Equidistant Cylindrical','lat',90,'lon',[-180 180]);
89        m_coast('color',[0 0 0]);
90        %m_grid('box','on')
91        %draw_coast(1.)
92    end

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.22