disp('Running MATLAB script file LongDat1fig2B.m') ;
%
%    Makes Figure 2B for the Longitudinal Data Analysis paper
%

% ??? line 37 couldn't work, 
% ??? get error message: ??? Error using ==> set
%                            Invalid line property: 'String'.
%                            Error in ==> Z:\zhaox\research\paper-with-marron\LongDat1fig2B.m
%                            On line 37  ==>   set(vchil(1),'String',[]) ;
%     remove line 37, the code works fine.

% Input data
%
fid=fopen('spellman_alpha_complete.txt', 'rt');
genevec=fscanf(fid, '%f');
mdata=reshape(genevec, [18, 4489]);

%  make main graphic
%
figure(1) ;
clf ;


ah1 = subplot(2,2,1) ;
  paramstruct = struct('vipcplot',1,...
                       'vicolplot',1,...
                       'isingleaxis',1,...
                       'iscreenwrite',1) ;
  curvdatSM(mdata,paramstruct) ;
  title('') ;
  set(ah1,'XTickLabelMode','manual') ;
  set(ah1,'XTickLabel',[]) ;
  set(ah1,'YTickLabelMode','manual') ;
  set(ah1,'yTickLabel',[]) ;
  vchil = get(ah1,'Children') ;
  %set(vchil(1),'String',[]) ;


ah2 = subplot(2,2,2) ;
  paramstruct = struct('vipcplot',1,...
                       'vicolplot',3,...
                       'isingleaxis',1,...
                       'iscreenwrite',1) ;
  curvdatSM(mdata,paramstruct) ;
  title('') ;
  set(ah2,'XTickLabelMode','manual') ;
  set(ah2,'XTickLabel',[]) ;
  set(ah2,'YTickLabelMode','manual') ;
  set(ah2,'yTickLabel',[]) ;
  vchil = get(ah2,'Children') ;
  set(vchil(1),'String',[]) ;


ah3 = subplot(2,2,3) ;
  paramstruct = struct('vipcplot',2,...
                       'vicolplot',1,...
                       'isingleaxis',1,...
                       'iscreenwrite',1) ;
  curvdatSM(mdata,paramstruct) ;
  title('') ;
  set(ah3,'XTickLabelMode','manual') ;
  set(ah3,'XTickLabel',[]) ;
  set(ah3,'YTickLabelMode','manual') ;
  set(ah3,'yTickLabel',[]) ;


ah4 = subplot(2,2,4) ;
  paramstruct = struct('vipcplot',2,...
                       'vicolplot',3,...
                       'isingleaxis',1,...
                       'iscreenwrite',1) ;
  curvdatSM(mdata,paramstruct) ;
  title('') ;
  set(ah4,'XTickLabelMode','manual') ;
  set(ah4,'XTickLabel',[]) ;
  set(ah4,'YTickLabelMode','manual') ;
  set(ah4,'yTickLabel',[]) ;
  vchil = get(ah4,'Children') ;
  set(vchil(1),'String',[]) ;




  pstr = 'LongDat1fig2B' ;
  orient portrait ;
  set(gcf,'PaperSize',[6.0, 5.0]) ; 
  set(gcf,'PaperPosition',[0.25, 0.25, 5.0, 4.5]) ; 
print('-dpsc', [pstr '.ps']) ;





