disp('Running MATLAB script file SiCur1fig5.m') ;
%
%    Makes Figure 5 for the SIgnificance of CURvature paper
%
%    This analyzes the Incomes Data



pstr = 'SiCur1fig5' ;



figh = figure(1) ;
clf ;


%  Read in data
%
matfilestr = '\Research\GeneralData\incomes' ;
vrange = [0;3] ;

load(matfilestr) ;

disp(['  Working on ' dtitstr ' Data']) ;
disp(dcomments) ;
disp(['    Read in ' num2str(length(data)) ' data points']) ;





%  do SiZer analyses
%
h1 = 10^(-1.1) ;
h2 = 10^(-0.9) ;

subplot(2,2,1) ;
  paramstruct = struct('iout',4,...
                       'imovie',0,...
                       'minx',vrange(1),...
                       'maxx',vrange(2),...
                       'bpar',1,...
                       'ibdryadj',0,...
                       'hhighlight',h1,...
                       'ibigdot',1,...
                       'famoltitle',[],...
                       'sizertitle',[],...
                       'curvsizertitle',[],...
                       'xlabelstr',xstr,...
                       'ylabelstr',ystr,...
                       'labelfontsize',12,...
                       'iscreenwrite',1) ;
  sizerSM(data,paramstruct) ;

subplot(2,2,2) ;
  paramstruct = struct('iout',4,...
                       'imovie',0,...
                       'minx',vrange(1),...
                       'maxx',vrange(2),...
                       'bpar',1,...
                       'ibdryadj',0,...
                       'hhighlight',h2,...
                       'ibigdot',1,...
                       'famoltitle',[],...
                       'sizertitle',[],...
                       'curvsizertitle',[],...
                       'xlabelstr',xstr,...
                       'ylabelstr',ystr,...
                       'labelfontsize',12,...
                       'iscreenwrite',1) ;
  sizerSM(data,paramstruct) ;

subplot(2,2,3) ;
  paramstruct = struct('iout',6,...
                       'imovie',0,...
                       'minx',vrange(1),...
                       'maxx',vrange(2),...
                       'bpar',1,...
                       'ibdryadj',0,...
                       'hhighlight',h1,...
                       'ibigdot',1,...
                       'famoltitle',[],...
                       'sizertitle',[],...
                       'curvsizertitle',[],...
                       'xlabelstr',xstr,...
                       'ylabelstr',ystr,...
                       'labelfontsize',12,...
                       'iscreenwrite',1) ;
  sizerSM(data,paramstruct) ;

%  %  manually add horizontal bar
%  %
%  vax = axis ;
%  hold on ;
%    plot([vax(1); vax(2)],[log10(h1); log10(h1)],'k-','LineWidth',2) ;
%  hold off ;

subplot(2,2,4) ;
  paramstruct = struct('iout',7,...
                       'imovie',0,...
                       'minx',vrange(1),...
                       'maxx',vrange(2),...
                       'bpar',1,...
                       'ibdryadj',0,...
                       'hhighlight',h2,...
                       'ibigdot',1,...
                       'famoltitle',[],...
                       'sizertitle',[],...
                       'curvsizertitle',[],...
                       'xlabelstr',xstr,...
                       'ylabelstr',ystr,...
                       'labelfontsize',12,...
                       'iscreenwrite',1) ;
  sizerSM(data,paramstruct) ;


%  %  manually add horizontal bar
%  %
%  vax = axis ;
%  hold on ;
%    plot([vax(1); vax(2)],[log10(h2); log10(h2)],'k-','LineWidth',2) ;
%  hold off ;




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


