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

Diff of /MITgcm_contrib/enderton/Diagnostics/DiagPlotResetAxes.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.3 by enderton, Wed Aug 10 19:58:04 2005 UTC
# Line 9  Line 9 
9  % CaxisFixed), the plots minimum and maximum values (use CaxisMinMax), or  % CaxisFixed), the plots minimum and maximum values (use CaxisMinMax), or
10  % values calculated by MATLAB (set both to zero).  NOTE WHICH ONES IT  % values calculated by MATLAB (set both to zero).  NOTE WHICH ONES IT
11  % DOESN'T WORK FOR.  % DOESN'T WORK FOR.
12  if ~isequal(pst,'Lin')    if ~isequal(pst,'Lin')
13          if CaxisFixed      try caxis(crange);
14          if ismember(cmp,{'Sep','Sbs'})      catch
15              try                  if CaxisFixed
16                  eval(['caxis(',fln,'range',flu,');']);              if ismember(cmp,{'Sep','Sbs'})
17                    try
18                        eval(['caxis(',fln,'range',flu,');']);
19                    end
20              end              end
21          end                  elseif CaxisMinMax
22          elseif CaxisMinMax              if ismember(cmp,{'Sep','Dif','Sbs'})
23          if ismember(cmp,{'Sep','Dif','Sbs'})                  caxis([min(plotdata(:)),max(plotdata(:))]);
24              caxis([min(plotdata(:)),max(plotdata(:))]);              end
25          end                  end
26          end      end
27  end  end
28    
29  % Reset the axis.  It can either be set to the axis limits (use AxesFixed),  % Reset the axis.  It can either be set to the axis limits (use AxesFixed),
# Line 34  if AxesTrimX Line 37  if AxesTrimX
37      end      end
38  end  end
39  if AxesTrimY  if AxesTrimY
40      if ~ismember(pltslc{inrow}{incol},{'lonfld','latfld'}) && ~isCS      if ~ismember(pltslc{inrow}{incol},{'lonfld','latfld','timfld'}) && ~isCS
41          set(gca,'ylim',[min(yax{inrow}{incol}(:)),...          set(gca,'ylim',[min(yax{inrow}{incol}(:)),...
42                          max(yax{inrow}{incol}(:))]);                          max(yax{inrow}{incol}(:))]);
43      end      end
44  end  end
45    
46  % Limit y range -- Good for looking at upper layer of ocean.  % Limit y range -- Good for looking at upper layer of ocean.
47  if isequal(flu,'O') && ~isempty(ylimO),  set(gca,'ylim',ylimO); end  if isequal(flu,'O') && ~isempty(ylimO) && ...
48  if isequal(flu,'A') && ~isempty(ylimA),  set(gca,'ylim',ylimA); end     isequal(pltslc{inrow}{incol}(4:6),'hgt'), set(gca,'ylim',ylimO); end
49    if isequal(flu,'A') && ~isempty(ylimA) && ...
50       isequal(pltslc{inrow}{incol}(4:6),'hgt'), set(gca,'ylim',ylimA); end
51    
52  % If this is a Dimension-height plot, the axis must be flipped.  % If this is a Dimension-height plot, the axis must be flipped.
53  if ismember(pltslc{inrow}{incol},{'lonhgt','lathgt'}) && isequal(flu,'A')  if ismember(pltslc{inrow}{incol},{'lonhgt','lathgt'}) && isequal(flu,'A')

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

  ViewVC Help
Powered by ViewVC 1.1.22