| 40 | 
 % Loop over subplots and make plots. | 
 % Loop over subplots and make plots. | 
| 41 | 
 for inrow = 1:nrow | 
 for inrow = 1:nrow | 
| 42 | 
      | 
      | 
| 43 | 
     nexp = length(page{inrow}); if nexp ~= 1, nexp = nexp - 1; end | 
     ntrl = length(page{inrow}); if ntrl ~= 1, ntrl = ntrl - 1; end | 
| 44 | 
     if nexp == 1, cmp = 'Sep'; else, cmp = page{inrow}{end}; end | 
     if ntrl == 1, cmp = 'Sep'; else, cmp = page{inrow}{end}; end | 
| 45 | 
     if nexp == 1, ncol = 1; elseif cmp == 'Sbs', ncol = nexp; else ncol = 1; end | 
     if ntrl == 1, ncol = 1; elseif cmp == 'Sbs', ncol = ntrl; else ncol = 1; end | 
| 46 | 
      | 
      | 
| 47 | 
     dx = (1-dxl-dxr-(ncol-1)*dxm)/ncol; | 
     dx = (1-dxl-dxr-(ncol-1)*dxm)/ncol; | 
| 48 | 
     dy = (1-dyb-dyt-(nrow-1)*dym)/nrow; | 
     dy = (1-dyb-dyt-(nrow-1)*dym)/nrow; | 
| 56 | 
          | 
          | 
| 57 | 
         % Set panel settings to default values, override with optional | 
         % Set panel settings to default values, override with optional | 
| 58 | 
         % settings. | 
         % settings. | 
| 59 | 
  | 
         DiagPlotDefaults; | 
| 60 | 
                 ExpInfo = page{inrow}{incol}; | 
                 ExpInfo = page{inrow}{incol}; | 
| 61 | 
                 for iarg = 14:2:length(ExpInfo) | 
                 for iarg = 14:2:length(ExpInfo) | 
| 62 | 
             if ~ismember(ExpInfo{iarg},diagrunparam) | 
             if ~ismember(ExpInfo{iarg},diagrunparam) | 
| 90 | 
         yi = 1-dyt-inrow*dy-(inrow-1)*dym; | 
         yi = 1-dyt-inrow*dy-(inrow-1)*dym; | 
| 91 | 
          | 
          | 
| 92 | 
         isp = (inrow-1)*ncol+incol; | 
         isp = (inrow-1)*ncol+incol; | 
| 93 | 
  | 
         if DiagDebug, disp(['  DiagDebug:  Subplot:  ',mat2str([nrow,ncol,isp])]); end | 
| 94 | 
  | 
         if DiagDebug, disp(['  DiagDebug:  SP Range: ',mat2str([xi,yi,dx,dy])]); end | 
| 95 | 
         subplot(nrow,ncol,isp); hold on; | 
         subplot(nrow,ncol,isp); hold on; | 
| 96 | 
         set(gca,'position',[xi,yi,dx,dy],'fontsize',fs_axis); | 
         set(gca,'position',[xi,yi,dx,dy],'fontsize',fs_axis); | 
| 97 | 
          | 
          | 
| 98 | 
  | 
         if Coast | 
| 99 | 
  | 
             fac = pi./180; | 
| 100 | 
  | 
             xax{inrow}{incol} = xax{inrow}{incol}.*fac; | 
| 101 | 
  | 
             yax{inrow}{incol} = yax{inrow}{incol}.*fac; | 
| 102 | 
  | 
         else, fac = 1; end | 
| 103 | 
  | 
          | 
| 104 | 
         % (Re)set axes and color axis -- Accounts for things like a possible | 
         % (Re)set axes and color axis -- Accounts for things like a possible | 
| 105 | 
         % colorbar, or trimming the axis in certain ways. | 
         % colorbar, or trimming the axis in certain ways. | 
| 106 | 
         % Apply desired colorbar, contour label, tick labels, box, grid, and | 
         % Apply desired colorbar, contour label, tick labels, box, grid, and | 
| 120 | 
  | 
  | 
| 121 | 
 % Save plot as desired. | 
 % Save plot as desired. | 
| 122 | 
 if SavePlots | 
 if SavePlots | 
| 123 | 
     outputfile = [outputdir,'/',pagename,'.eps']; | 
     if isequal(outputdir,'') | 
| 124 | 
  | 
         outputfile = [pagename,'.eps']; | 
| 125 | 
  | 
     else | 
| 126 | 
  | 
         outputfile = [outputdir,'/',pagename,'.eps']; | 
| 127 | 
  | 
     end | 
| 128 | 
     print('-depsc2',outputfile); | 
     print('-depsc2',outputfile); | 
| 129 | 
 end | 
 end |