clear;clc;close all;

Mul_MilitarySpending
Mul_BP

mil_zlb = dlmread('Mul_Mil_ZLB.txt');
mil = dlmread('Mul_Mil_NoZLB.txt');
dif_mil = dlmread('Dif_Mil.txt');

bp_zlb = dlmread('Mul_BP_ZLB.txt');
bp = dlmread('Mul_BP_NoZLB.txt');
dif_bp = dlmread('Dif_BP.txt');


hor=4;
zz=zeros(1,hor+1);


set(0,'DefaultAxesFontName','Times');
set(0,'DefaultAxesFontSize',10);

figure(1)
subplot(1,3,1)
x1 = [(0:1:hor), fliplr((0:1:hor))];
x2 = [mil_zlb(:,2)', fliplr(mil_zlb(:,3)')];
h=fill(x1, x2, [0.8 0.8 0.8]);
set(h,'EdgeColor','none');
hold on
plot(0:1:hor, mil_zlb(:,1),'k--', 'LineWidth', 1.5)
hold on
plot(0:1:hor, bp_zlb(:,1),'r-o', 'LineWidth', 1.5)
hold on
plot(0:1:hor, bp_zlb(:,2), 'r--')
hold on
plot(0:1:hor, bp_zlb(:,3), 'r--')
hold on
plot(0:1:hor, zz, 'k-','LineWidth', 0.5);
axis([0 hor -1.5 4.5])
title('ZLB')
subplot(1,3,2)
x1 = [(0:1:hor), fliplr((0:1:hor))];
x2 = [mil(:,2)', fliplr(mil(:,3)')];
h=fill(x1, x2, [0.8 0.8 0.8]);
set(h,'EdgeColor','none');
hold on
plot(0:1:hor, mil(:,1),'k--', 'LineWidth', 1.5)
hold on
plot(0:1:hor, bp(:,1),'r-o', 'LineWidth', 1.5)
hold on
plot(0:1:hor, bp(:,2), 'r--')
hold on
plot(0:1:hor, bp(:,3), 'r--')
hold on
plot(0:1:hor, zz, 'k-','LineWidth', 0.5);
axis([0 hor -1.5 4.5])
title('Outside ZLB')
subplot(1,3,3)
x1 = [(0:1:hor), fliplr((0:1:hor))];
x2 = [dif_mil(:,2)', fliplr(dif_mil(:,3)')];
h=fill(x1, x2, [0.8 0.8 0.8]);
set(h,'EdgeColor','none');
hold on
l2=plot(0:1:hor, dif_mil(:,1),'k--', 'LineWidth', 1.5);
hold on
l1=plot(0:1:hor, dif_bp(:,1),'r-o', 'LineWidth', 1.5);
hold on
plot(0:1:hor, dif_bp(:,2), 'r--')
hold on
plot(0:1:hor, dif_bp(:,3), 'r--')
plot(0:1:hor, zz, 'k-','LineWidth', 0.5);
hold on
title('Difference')
legend([l1 l2],'BP','Military Spending')
legend boxoff     
% set(gcf,'PaperPosition',[0.63 0.63 19.72 8/1.6]);
% print(figure(1),'-depsc2','-r2500','-painters', 'Fig2.eps');
% print(figure(1),'-dpdf',  '-r2500','-painters', 'Fig2.pdf');


