/[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.2 by enderton, Mon Feb 7 05:31:45 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 42  end Line 45  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) && ...  if isequal(flu,'O') && ~isempty(ylimO) && ...
48     ~isequal(pltslc{inrow}{incol}(4:6),'fld'), set(gca,'ylim',ylimO); end     isequal(pltslc{inrow}{incol}(4:6),'hgt'), set(gca,'ylim',ylimO); end
49  if isequal(flu,'A') && ~isempty(ylimA) && ...  if isequal(flu,'A') && ~isempty(ylimA) && ...
50     ~isequal(pltslc{inrow}{incol}(4:6),'fld'), set(gca,'ylim',ylimA); end     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.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22