# First runs the script beta_scale_gamma.gpl
# then we plot the last fitting functions for the largest L plotted
bc = 0.5*log(1.0+sqrt(2.0));
unset log
set   log
set fit errorvariables
set macros
set key bottom left
set autoscale

Ls    = "40 60 80 100 120 140 160 200 500";
NLs   = words(Ls);
LL(i) = word(Ls,i);
cplot1(i) = sprintf("<grep 'm %s ' all|awk 'BEGIN{bc= 0.5*log(1.0+sqrt(2.0))} $3>bc{print -(bc-$3)/bc,$6,$7}'",LL(i));
cplot2(i) = sprintf("<grep 'm %s ' all|awk 'BEGIN{bc= 0.5*log(1.0+sqrt(2.0))} $3<bc{print  (bc-$3)/bc,$6,$7}'",LL(i));

set ylabel "{/Symbol c}"
# ------------- t<0 
set term qt 1
set xlabel "|t| (t<0)"
#plot for[i=1:NLs] cplot1(i) u 1:2:3 w e t sprintf("L=%s",LL(i))
plot [0.00129:0.735][0.0146:1300] for[i=1:NLs] cplot1(i) u 1:2:3 w e t sprintf("L=%s",LL(i))
replot (x>=0.1*x1min&&x<=10*x1max)?(c1*x**(-g1)):(1/0) notit 
set term post eps enha color 24
set out  "beta_scale_gamma_all.eps"
replot
set out
set term qt 1
replot
# ------------- t>0 
set term qt 2
set xlabel "|t| (t>0)"
# plot for[i=1:NLs] cplot2(i) u 1:2:3 w e t sprintf("L=%s",LL(i))
plot [0.0047:0.276][1.06:1800] for[i=1:NLs] cplot2(i) u 1:2:3 w e t sprintf("L=%s",LL(i))
replot  (x>=0.1*x2min&&x<=10*x2max)?(c2*x**(-g2)):(1/0) notit 
set term post eps enha color 18
set out  "beta_scale_gamma_all_2.eps"
replot
set out
set term qt 2
replot
#  ---------------------------------------------------------------------
#  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/>.
#  -----------------------------------------------------------------------
