fig = figure;
subplot(3,3,1);
plot(calvec_p,exp(yall),'LineWidth',1,'color',rgb('LightBlue'));
hold on;
  plot(calvec_p,exp(fall),'- k','LineWidth',3);
  x = calvec_p(T+1:T+100);
  x2 = [x;flipud(x)];
  z = [exp(fcst(T+1:T+100,4));flipud(exp(fcst(T+1:T+100,5)))];
  fill(x2,z,rgb('LightGray'),'EdgeColor','none');
  z = [exp(fcst(T+1:T+100,4));flipud(exp(fcst(T+1:T+100,3)))];
  fill(x2,z,rgb('DarkGray'),'EdgeColor','none');
  z = [exp(fcst(T+1:T+100,3));flipud(exp(fcst(T+1:T+100,2)))];
  fill(x2,z,rgb('DarkGray'),'EdgeColor','none');
  z = [exp(fcst(T+1:T+100,2));flipud(exp(fcst(T+1:T+100,1)))];
  fill(x2,z,rgb('LightGray'),'EdgeColor','none');
  
  plot(calvec_p,exp(fcst(:,3)),'- k','LineWidth',2);
  
hold off;
set(gca, 'YScale', 'log');
ylabel('2011 USD');
%xlabel('Year');
xlim([1915 2125]);
ylim([0 10000000]);

yticks([1000 100000 10000000])
yticklabels({'10^3','10^5','10^7'})

title('(a) Global Factor (f_t)');

a_list = {'(b) ';'(c) ';'(d) ';'(e) ';'(f) ';'(g) ';'(h) ';'(i) '};
for i = 1:8;
  subplot(3,3,i+1);
    ss = char(country_list(i));
    ic = colnumber(ss,country_code);
    yfcst = NaN(T+100,5);
    yfcst(T+1:T+100,:) = squeeze(yfcst_m_pct(T+1:T+100,ic,:));
    plot(calvec_p,exp(yall),'LineWidth',2,'color',rgb('LightBlue'));
    hold on;
      plot(calvec_p,exp(yall(:,ic)),'- r','LineWidth',3);
      x = calvec_p(T+1:T+100);
      x2 = [x;flipud(x)];
      z = [exp(yfcst(T+1:T+100,4));flipud(exp(yfcst(T+1:T+100,5)))];
      fill(x2,z,rgb('LightSalmon'),'EdgeColor','none');
      z = [exp(yfcst(T+1:T+100,4));flipud(exp(yfcst(T+1:T+100,3)))];
      fill(x2,z,rgb('Salmon'),'EdgeColor','none');
      z = [exp(yfcst(T+1:T+100,3));flipud(exp(yfcst(T+1:T+100,2)))];
      fill(x2,z,rgb('Salmon'),'EdgeColor','none');
      z = [exp(yfcst(T+1:T+100,2));flipud(exp(yfcst(T+1:T+100,1)))];
      fill(x2,z,rgb('LightSalmon'),'EdgeColor','none');
      
       plot(calvec_p,exp(yfcst(:,3)),'- r','LineWidth',3);
       plot(calvec_p,exp(fall),'- k','LineWidth',3);
       plot(calvec_p,exp(fcst(:,3)),'- k','LineWidth',2); 
   hold off;
   set(gca, 'YScale', 'log');
   if i == 3;
     ylabel('2011 USD');
     xlabel('Year');
   end;
   if i == 6;
       ylabel('2011 USD');
       
   end;
   if i > 5;
       xlabel('Year');
   end;
   xlim([1915 2125]);
   ylim([0 10000000]);
   yticks([1000 100000 10000000])
   yticklabels({'10^3','10^5','10^7'})
   str_tmp = char(country(ic));
   str_tmp2 = char(a_list(i));
   str_tmp3 = [str_tmp2 str_tmp];
   title(str_tmp3);
   
end;

orient landscape;
print(fig, [figdir, 'Figure_11_9panels' mod_name], '-dpdf','-bestfit');
close(gcf);
