# Usage: Ls = "40 60 80 100"; load "binder.gpl"
#
bc = 0.5*log(1.0+sqrt(2.0));
set fit errorvariables
set macros
bplot(L) = sprintf("<grep '^%s ' allem|awk 'BEGIN{bc= 0.5*log(1.0+sqrt(2.0))} ($12/$11)<0.002{print $2,1.0-$11/3.0,$12}'",L);
# Ls = "40 60 80 100 120 140 160 200 500 1000";
#Ls = "100 120 140 160 200 500 1000";
NLs   = words(Ls);
LL(i) = word (Ls,i);

set palette rgbformulae 3,11,16
set xlabel "{/Symbol b}"
set ylabel "U"
set term qt 1 enhanced
plot   for[i=1:NLs] bplot(LL(i)) u 1:2:3 w e t sprintf("L=%s",LL(i))
replot for[i=1:NLs] bplot(LL(i)) u 1:2:3 smooth unique notit
replot 2.0/3.0 w lines lt 1 t "2/3" 
#  ---------------------------------------------------------------------
#  Copyright by Konstantinos N. Anagnostopoulos (2004-2014)
#  Physics Dept., National Technical University,
#  konstant@mail.ntua.gr, www.physics.ntua.gr/~konstant
#  
#  This program is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, version 3 of the License.
#  
#  This program is distributed in the hope that it will be useful, but
#  WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#  General Public License for more details.
#  
#  You should have received a copy of the GNU General Public Liense along
#  with this program.  If not, see <http://www.gnu.org/licenses/>.
#  -----------------------------------------------------------------------
