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

# chigam = "\"< awk 'NF==9{print $1,$4,$5}' all-max\""
# f(x) = cc*x**gam
# cc=0.44; gam = 1.75;
# fit f(x) @chigam using 1:2:3 via cc,gam
# set term qt enhanced 1
# set log
# set xtics (40,60,80,100,140,200,500,1000)
# set xlabel "L"
# set ylabel "{/Symbol c}_{max}(L)"
# plot [30:1100][:11000] @chigam using 1:2:3 w e notit, \
#      f(x) t sprintf("{/Symbol g/n} =  %.3f  +/-  %.3f",gam,gam_err)


# set term post enha eps color 24
# set out "pseudo_gamma.eps"
# replot
# set out
# --------------------------------------------------
chigam = "\"< awk 'NF==9{print $1,$8,$9}' all-max\""
f(x) =  cc*log(x)+bb+ff/x
#f(x) =  cc*log(x)*(1+ff/x*log(x)**bb)
#f(x) =  cc*x**gg+bb+ff/x
cc=0.13;
fit [40:500] f(x) @chigam using 1:2:3 via cc,bb,ff

set term qt enhanced 1
# set log x
unset log
set log x
set xtics (40,60,80,100,140,200,500,1000)
#set xtics autofreq
set xlabel "L"
set ylabel "c_{max}(L)"
plot [30:1100][0.4:.9] @chigam using 1:2:3 w e notit, \
     f(x) notit


set term post enha eps color 24
set out "pseudo_alpha.eps"
replot
set out


# --------------------------------------------------------
unset log
set xtics autofreq
set term qt enhanced 1

#  ---------------------------------------------------------------------
#  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/>.
#  -----------------------------------------------------------------------
