Back to home page

MITgcm

 
 

    


Warning, /utils/matlab/Graphix/GraphixPlotSetSubplot.m is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit 5bbd0d07 on 2005-10-19 20:00:03 UTC
5bbd0d07c9 Dani*0001 % DiagPlotSetSubplot is called by DiagPlot and cannot be used seperately.
                0002 
                0003 
                0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                0005 %                        Initialize subplot in figure                     %
                0006 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                0007 
                0008 
                0009 % Determine number of plot rows, columns, xi, yi, dx, dy.
                0010 if ismember(cmp,{'Sep','OvE','OvC','Dif'})
                0011     nrows = nsp;
                0012     ncols = 1;
                0013     dx = 1-dxl-dxr;
                0014     dy = (1-dyb-dyt-(nrows-1)*dym)/nrows;
                0015     xi = dxl;
                0016     yi = 1-dyt-isp*dy-(isp-1)*dym;
                0017 elseif isequal(cmp,'Sbs')
                0018     nrows = nsp/2;
                0019     ncols = 2;
                0020     dx = (1-dxl-dxr-dxm)/2;
                0021     dy = (1-dyb-dyt-(nrows-1)*dym)/nrows;
                0022     xi = dxl + mod((isp-1),2)*(dx+dxm);
                0023     yi = 1-dyt-ceil(isp/2)*dy-(ceil(isp/2)-1)*dym;
                0024 else
                0025     error(['Undefined comparison type:  ',cmp]);
                0026 end
                0027 cxi = xi+dx-dxcb;
                0028 
                0029 
                0030 % Initiate subplot.
                0031 subplot(nrows,ncols,isp);
                0032 set(gca,'position',[xi,yi,dx,dy]);
                0033 set(gca,'fontsize',fs_tick);
                0034 hold on;