clear;

load dstchocs.txt;

ydat=dstchocs;          % Yi's: column vector n*1
n=size(ydat,1);               % sample size n
xdat=(1:n)';                  % Xi's: column vector n*1

Z=[xdat ydat];                % matrix of data n*2

gpanal(Z);
subplot(2,1,1)
%xlabel('t')
xlabel('t (months)','FontSize',12)
%ylabel('Chocolate consumption (kilotonnes)')
ylabel('Chocolate production (kilotonnes)','FontSize',12)
title('(a) The Family Plot','FontSize',15)


subplot(2,1,2)
%xlabel('t')
xlabel('t (months)','FontSize',12)
ylabel('log_{10}(h)','FontSize',12)
title('(b) The SiZer Plot','FontSize',15)


%orient tall;print -dpsc c:\utenti\vita\articoli\cfig1
orient tall;
print -dpsc c:CFIG1.ps
print -depsc c:CFIG1.eps

