set term post eps enh color 12 
set out "Eall_NN_NNN_s_U15etc_v2.eps"
set size 0.5,0.7
set rmargin 0
set lmargin 0
set tmargin 0
set bmargin 0
set samples 1000

set multiplot

set size 0.416,0.355
set origin 0.08,0.065
set rmargin 0
set lmargin 0
set tmargin 0
set bmargin 0

PS=0.9
PS1=0.6
set style line 2 lt 2 lc rgb "#00BB00" lw 3 pt 4  ps PS1
set style line 5 lt 5 lc rgb "#00BBBB" lw 3
set style line 7 lt 1 lc rgb "#FFFF7E" lw 15
set style line 8 lt 1 lc rgb "#00FFFF" lw 15

set xlabel "s" offset 0,0.2
set ylabel "<&{/=5 .}@{&{/=5 .}\303}{/Symbol s}_{&{/=5 .}i}&{/=5 .}{/Symbol \327}&{/=8 .}@{&{/=5 .}\303}{/Symbol s}_{&{/=5 .}i+{/Symbol d}}>" offset 1
set key samplen 2 spacing 1.2 bottom
set xtics 0.2
set mxtics 2
set ytics 0.5
set mytics 2

set arrow 1 from log(2),-1.8 to log(2),1 nohead lt 4 lc -1 front
set label 1 "{/Symbol d} = NN" at 0.1,-0.45
set label 2 "{/Symbol d} = NNN" at 0.1,0.3
set label 3 "{/=8 Weiss MF}" at 0.21,0.9 rotate by -24

set xzeroaxis

plot [0:1.45][-1.8:1]\
"Data/Heisenberg/Heisenberg_WeissMF_T_E_s.dat" u 3:(-2.0*$2) t"" w l lt -1,\
"Data/Heisenberg/Heisenberg_WeissMF_T_E_s.dat" u 3:($3<0.1?-2*$2*0.905:1/0) t"" w l lt 1,\
x<0.35?-1.145 + 1.4*x**1.3333 +0.15*x**2.6666:1/0 t"" lt 3,\
x<0.35?-1.28+1.4*x**1.5+0.6*x**3:1/0 t"" w l lt 2 lc rgb "#00BB00",\
x**2<0.04?-1.6050433   +   2.1370722   *x**2+x**4*   0.76963691:1/0 t"" lt 4 lw 1,\
"Data/Heisenberg/Heisenberg_WeissMF_T_E_s.dat" u 3:($3<0.1?2*$2*0.905:1/0) t"" w l lt 1,\
x<0.35?0.76-1.48*x**1.5  + 0.32*x**3:1/0  t"" w l lt 2 lc rgb "#00BB00",\
x<0.2? 0.63 -1.77 *x**2+x**4*1.1 :1/0 t"" lt 4 lw 1,\
"< bin/make_sparse_2d.sh 18 7 0.02 0.001 < Data/DMFT/results_U150mu0_ent_corr.dt0" u 18:($7**2) t"DMFT" w lp lt 1 lw 3 pt 7 ps 0.6,\
"" u 18:(-$7**2) t"" w lp lt 1 lw 3 pt 7 ps 0.6,\
"< bin/make_sparse_2d.sh 3 4 0.025 0.03 < Data/DQMC_3D/sisju15extrapolated.dat" u 3:(3*$4) t "d = 3" w lp lt 3 lw 3 pt 12 ps PS,\
"< bin/make_sparse_2d.sh 2 3 0.03 0.03 < Data/DQMC_2D/U12.25L6_beta_s_sisj.dat" u ($2):($2>0.3?3*$3:1/0) w lp  t"d = 2" ls 2,\
"< bin/make_sparse_2d.sh 2 4 0.03 0.03 < Data/DQMC_2D/U12.25L6_beta_s_sisj.dat" u ($2):($2>0.3?3*$4:1/0) w lp t "" ls 2,\
"< paste Data/DQMC_1D/DQMC_1d_U867_N16_32_64.av Data/DQMC_1D/BA_DQMCgrid_beta_s_E_D.dat" u 16:(3*$11) t"d = 1" w l lt 4 lw 3,\
"" u 16:(3*$14) t"" w l lt 4 lw 3,\
"< bin/make_sparse_2d.sh 2 3 0.02 0.03 < Data/DQMC_3D/sisj110u15.dat" u 2:($2>0.2?3*$3:1/0) w lp t"" lt 3 lw 3 pt 12 ps PS,\
"Data/Heisenberg/Heisenberg_Wessel_beta_E_Eint_s.dat" u 4:(($2+0.75)*4/3) w l t"Heisenberg d = 3" lt 1 lc 3 lw 3,\
x<0.23?-1.2+1.45*x**1.333-0.2*x**2.666 :1/0 t"" lt 1 lc 3,\
"Data/Heisenberg/Heisenberg_E_s_12x12.dat" u 6:(2*$4) t"Heisenberg d = 2" w l lt 1 lw 2 lc rgb "#00BB00",\
"Data/Heisenberg/Heisenberg_E_s_050.dat" u 6:(4*$4) t"Heisenberg d = 1" w l lt 1 lw 2 lc 4

set size 0.416,0.245
set origin 0.08,0.44
set rmargin 0
set lmargin 0
set tmargin 0
set bmargin 0


set xlabel ""
set format x ""
set ylabel "E / (Z^{&{.}1/2}&{.}t)" offset 1
set nokey
set ytics 0.1
set mytics 2

unset label 3
set arrow 1 from log(2),-0.425 to log(2),0.05 nohead lt 4 lc -1 front
set label 1 "total energy" at 0.1,-0.09
set label 2 "kinetic energy" at 0.733,-0.15


plot [0:1.45][-0.425:0.05] \
"< bin/make_sparse_2d.sh 18 13 0.02 0.02 < Data/DMFT/results_U150mu0_ent_corr.dt0" u 18:($18>0.1?$13/sqrt(6):1/0) t"DMFT cubic U=15" w lp lt 1 lw 3 pt 7 ps PS1,\
"< bin/make_sparse_2d.sh 2 3 0.03 0.03 < Data/DQMC_2D/U12.25L6_beta_s_Ek_D.dat" u 2:($2>0.15?$3/sqrt(4):1/0) t"DQMC square U=12.25" w lp ls 2,\
"< bin/make_sparse_2d.sh 3 6 0.03 0.03 < Data/DQMC_3D/U15L6dat0.dat" u 3:($3>0.15?$6/sqrt(6):1/0) t"DQMC cubic U=15" w lp lt 3 lw 3 pt 12 ps PS,\
"Data/BA/BA_U866_allT_D.dat" u 4:((-0.30495 + $3 + $2*$4 - 8.66*$8)/sqrt(2)) t"BA linear U=8.66" w l lt 4 lw 4,\
"< bin/make_sparse_2d.sh 18 13 0.02 0.02 < Data/DMFT/results_U150mu0_ent_corr.dt0" u 18:($18>0.1?($13+$1*$10)/sqrt(6):1/0) t"" w lp lt 1 lw 3 pt 7 ps PS1,\
"< bin/make_sparse_2d.sh 2 3 0.03 0.03 < Data/DQMC_2D/U12.25L6_beta_s_Ek_D.dat" u 2:($2>0.15?($3+12.25*$4)/sqrt(4):1/0) t"" w lp ls 2,\
"< bin/make_sparse_2d.sh 3 4 0.03 0.03 < Data/DQMC_3D/U15L6dat0.dat" u 3:($3>0.15?$4/sqrt(6):1/0) t"" w lp lt 3 lw 3 pt 12 ps PS,\
"Data/BA/BA_U866_allT_D.dat" u 4:((-0.30495 + $3 + $2*$4)/sqrt(2)) t"" w l lt 4 lw 4



set size 0.14,0.17
set origin 0.335,0.36
set rmargin 0
set lmargin 0
set tmargin 0
set bmargin 0


set nokey

set xtics 0.2 offset 0,0.4 format "{/=10 %g}"
set ytics 0.2 offset 0.5,0.1 format "{/=10 %g}"
set mytics 1
set mxtics 2

set xlabel "{/=10 s}" offset 0,1
set ylabel "{/=10 |<@{&{/=5 .}\303}{/Symbol s}_{/=7 i}&{/=5 .}{/Symbol \327}&{/=5 .}@{&{/=5 .}\303}{/Symbol s}_{/=7 i+{/Symbol d}}&{/=5 .}>|}" offset 1.8

unset arrow 1
set yzeroaxis
set label 2 "{/=10{/Symbol d}&{/=5 .}=&{/=5 .}{/=8 NNN}}" at 0.02,0.54
set label 1 "{/=10|{/Symbol d}|&{/=5 .}=&{/=5 .}{/Symbol \245}}" at 0.15,0.24
set label 3 "{/=8 Weiss MF}" at 0.12,1.01 rotate by -34
set label 4 "{/=11 U&{/=5 .}{/Symbol \256 \245}}" at 0.65,0.9 right

set style rectangle fc rgb"white" fillstyle solid 1.0 noborder
set object 1 rectangle from screen 0.285,0.34 to screen 0.48,0.51 behind

set arrow 1 from 0,0 to 0.7,0 nohead lt 1 lc 4 lw 3 front
set arrow 2 from 0,0.09 to 0,0 nohead lt 1 lc rgb "#00BB00" lw 6 front

set label 5 "{/=14 (a)}" at screen 0,0.675
set label 6 "{/=14 (b)}" at screen 0,0.41


plot [-0.05:0.7][-0.1:1.05]\
x>0&&x<log(2)?0:1/0  lt 1 lc rgb "#00BB00" lw 6,\
"Data/Heisenberg/Heisenberg_WeissMF_T_E_s.dat" u 3:(-2.0*$2) t"" w l lt -1,\
x<log(2)/2?0.4216**2*(1-(x/(log(2)/2))**1.3333)**0.76:1/0 t"" w l lt 1 lc 3 lw 4,\
x<0.23?0.812-1.8*3/4*x**1.3333:1/0 t"" lt 1 lc rgb "#00BB00" lw 2,\
"Data/Heisenberg/Heisenberg_Scalettar_12x12.dat" u 9:($9>0.2?12*$7:1/0) t"" w l lt 1 lw 2 lc rgb "#00BB00",\
"Data/Heisenberg/corr_xxx_AF_s.dat" u 10:(12*$3) t"" w l lt 1 lw 2 lc 4,\
x<0.23?0.857-2.16*3/4*x**1.3333:1/0 t"" lt 1 lw 2 lc 3,\
"Data/Heisenberg/Heisenberg_16x16x16_RTS.dat" u 9:($9>0.2?12*$7:1/0) t"" w l lt 1 lw 3 lc 3


#"Data/DMFT/results_U150mu0_ent_corr.dt0" u 18:($7**2) t"" w l lt 1 lw 3,\

