% function makeEpsSet12(filename)
% 
% load(filename);
close all

% ----------------------------------------------------------------------
% Effective sample sizes and degree of interaction
figure(1)
set(gcf,'paperunits','centimeters','papersize',[21 10],'paperposition',[0 0 21 10]);

yrange = [500 settings.N];
subinterval = 575:825;

hoffset = .07;
voffset = .1;
voffset2 = .05;
fw = .28;
fh = .4;
axes('position',[0+hoffset fh+voffset+voffset2 fw fh]);
plot([subinterval(1) subinterval(end)],ones(2,1)*settings.essThreshold*settings.N,'k--','linewidth',1.5);
hold on
plot(subinterval, ESS{1}(subinterval)*settings.N,'k.-','linewidth',0.5,'markersize',1); %#ok<*USENS>

set(gca,'ylim',yrange,'xlim',[subinterval(1) subinterval(end)],...
    'xticklabel',{},'fontsize',9,'box','off');
yh = ylabel('$N_n^{\mathrm{eff}}$','interpreter','latex');
set(yh,'position',get(yh,'position').*[0 1 1] + [535 0 0]);
title('ARPF');
grid on

axes('position',[.31+hoffset fh+voffset+voffset2 fw fh]);
plot([subinterval(1) subinterval(end)],ones(2,1)*settings.essThreshold*settings.N,'k--','linewidth',1.5);
hold on
plot(subinterval, ESS{2}(subinterval)*settings.N,'k.-','linewidth',0.5,'markersize',1);
set(gca,'ylim',yrange,'xlim',[subinterval(1) subinterval(end)],...
    'yticklabel',{},'xticklabel',{},'fontsize',9,'box','off');
title('Simple');
grid on

axes('position',[.62+hoffset fh+voffset+voffset2 fw fh]);
plot([subinterval(1) subinterval(end)],ones(2,1)*settings.essThreshold*settings.N,'k--','linewidth',1.5);
hold on
plot(subinterval, ESS{3}(subinterval)*settings.N,'k.-','linewidth',0.5,'markersize',1);
set(gca,'ylim',yrange,'xlim',[subinterval(1) subinterval(end)],...);
    'yticklabel',{},'xticklabel',{},'fontsize',9,'box','off');
title('Greedy');
grid on

extra = 0.01;

axes('position',[0+hoffset voffset fw fh]);
stem(subinterval,log2(interaction{1}(subinterval)),'k.-');
hold on
plot([subinterval(1) subinterval(end)],mu1*ones(1,2),'k--','linewidth',1.5);
hold off
set(gca,'ylim',[0 log2(settings.N)+extra],'fontsize',9,'box','off','xlim',[subinterval(1) subinterval(end)]);
xlabel('$n$','interpreter','latex');
yh = ylabel('$K_n$','interpreter','latex');
set(yh,'position',get(yh,'position').*[0 1 1] + [535 0 0]);
grid on

axes('position',[.31+hoffset voffset fw fh]);
stem(subinterval,log2(interaction{2}(subinterval)),'k.-');
hold on
plot([subinterval(1) subinterval(end)],mu2*ones(1,2),'k--','linewidth',1.5);
hold off 
set(gca,'ylim',[0 log2(settings.N)+extra],...
    'yticklabel',{},'fontsize',9,'box','off','xlim',[subinterval(1) subinterval(end)]);
xlabel('$n$','interpreter','latex');
grid on

axes('position',[.62+hoffset voffset fw fh]);
stem(subinterval,log2(interaction{3}(subinterval)),'k.-');
hold on
plot([subinterval(1) subinterval(end)],mu3*ones(1,2),'k--','linewidth',1.5);
hold off 
set(gca,'ylim',[0 log2(settings.N)+extra],...
    'yticklabel',{},'fontsize',9,'box','off','xlim',[subinterval(1) subinterval(end)]);
xlabel('$n$','interpreter','latex');
grid on

print -depsc -loose figure1


return
