set term post eps enh color 12 
set out "Heisenberg_deriv_NN_NNN.eps"
set size 0.5,0.4
set multiplot
set samples 1000
set rmargin 1
set lmargin 6
set tmargin 1

PS=0.8
PS1=0.7
PS2=0.6
set style line 2 lt 2 lc rgb "#00BB00" lw 3 pt 4  ps 0.5
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.3
set ylabel "|d <&{/=5 .}@{&{/=5 .}\303}{/Symbol s}_{&{/=5 .}i}&{/=5 .}{/Symbol \327}&{/=8 .}@{&{/=5 .}\303}{/Symbol s}_{&{/=5 .}i+{/Symbol d}}> / ds|" offset 0.5
set key samplen 2 spacing 1.3 left Left reverse at screen 0.32,0.36
# reverse
set xtics 0.2
set mxtics 2
set ytics 1
set mytics 2

#s_corr=0.016
s_corr=0.0

set xzeroaxis

set arrow 1 from log(2)/2,0 to log(2)/2,1.6 lt 9 nohead

#set label "{/=14 Heisenberg" at screen 0.15,0.15
#set label "{/=14 model (cubic)" at screen 0.15,0.11

plot [0:0.7][0:4.25]\
"< bin/make_sparse_2d.sh 1 3 0.013 0.01 < Data/Heisenberg/Heisenberg_16x16x16_RTS_deriv.dat" u ($1+s_corr):($1>0.27?-12*$3:1/0) t"{/Symbol d} = NNN" w lp lt 1 lw 4 lc 3 pt 7 ps 1,\
x<0.283?2.16*x**0.3333:1/0 t"" lt 1 lw 2 lc 3,\
"< bin/make_sparse_2d.sh 1 3 0.013 0.03 < Data/Heisenberg/Heisenberg_16x16x16_RTS_NNderiv.dat" u ($1+s_corr):($1>0.27?12*$3:1/0) t"{/Symbol d} = NN" w lp lt 3 lw 4 lc 1 pt 5 ps 0.8,\
"< bin/make_sparse_2d.sh 1 3 0.013 0.01 < Data/Heisenberg/Heisenberg_16x16x16_RTS_deriv.dat" u ($1+s_corr):($1>0.27?-12*$3:1/0) t"" w lp lt 1 lw 4 lc 3 pt 7 ps 1,\
x<0.283?1.8*x**0.3333:1/0 t"" lt 3 lc 1 lw 2,\
"Data/Heisenberg/Heisenberg_16x16x16_RTS.dat" u ($9+s_corr):(4./3/$2) w l t "4T/(3J)" lt -1

set size 0.23,0.2
set origin 0.09,0.18
set lmargin 3
set xtics 0.5
set nokey

set xlabel "{/=10 T/J}" offset 0,0.5
set ylabel "{/=10 |d <{/Symbol s}_i&{/=5 .}{/Symbol \327}&{/=5 .}{/Symbol s}_{i+{/Symbol d}}> / dT|}" offset 0.5,-0.3
set format "{/=10 %g}"

set arrow 1 from 0.94,0 to 0.94,2 lt 9 nohead

 
plot [0.5:1.5][0:2] \
"Data/Heisenberg/Heisenberg_16x16x16_RTS_NNderivT.dat" u 1:($1>0.89?12*$3:1/0) w lp  lt 3 lw 3 lc 1 pt 5 ps 0.5,\
x<0.89?1.33*x**3+0.5*x**4:1/0  t"" lt 3 lc 1 lw 2,\
"Data/Heisenberg/Heisenberg_16x16x16_RTS_NNNderivT.dat" u 1:($1>0.89?-12*$3:1/0) w lp  lt 1 lw 3 lc 3 pt 7 ps 0.6,\
x<0.89?1.63*x**3+0.55*x**4:1/0  t"" lt 1 lc 3 lw 2