clear all;
close all;

path1 ='E:\Study\Epic_Win\!provenance\prov3\prov2\';

setOfLs = [8 10 12 16];
setOfbetas = [940 970 1020 1053 1120]/100;
param = setOfbetas;
l2 = length(setOfLs);
l3 = length(setOfbetas);

means = zeros(l2,l3);
stds = zeros(l2,l3);

markers = cellstr(['s'; 'o'; 'v'; '^'; '>'; '<'; 'd'; 'x'; '+'; '*'; '+'; '*']);
            
for i2 =1:l2
    for i3 =1:l3
        pathm = [path1 'L' int2str(setOfLs(i2)) '\beta' int2str(setOfbetas(i3)*100) '\'];
        if(i2==2)
            pathm = [pathm 'run2\']
        else
            pathm = [pathm 'run1\']
        end
        fname1 = [pathm 'analysis_summary.txt'];
        if (exist(fname1, 'file') == 2)
            cdata1 = load(fname1);
            means(i2,i3) = cdata1(1);
            stds(i2,i3) = cdata1(2);
        else
            means(i2,i3) = 0;
            stds(i2,i3) = 0;
        end  
    end
end
figure;
hold all;
for i2=1:l2
    if(i2==2)
        errorbar(1./param(1:end-1),means(i2,1:end-1)*setOfLs(i2),stds(i2,1:end-1)*setOfLs(i2),[':' char(markers(i2))],'MarkerSize',10);
    else
        errorbar(1./param,means(i2,:)*setOfLs(i2),stds(i2,:)*setOfLs(i2),[':' char(markers(i2))],'MarkerSize',10);
    end
end
legend('L=8.','L=10.','L=12.','L=16.','L=18.','L=20.','Location','NorthEast');
xlabel('T','fontsize',22);
ylabel(char('S_{red,green}*L'),'FontSize',22);
set(findobj('FontSize',10),'FontSize',20);
