# set term png small color
#################################################
#
set term png
set out 'degree.png'
# set term postscript eps enhanced color 20
# set out 'degree.eps'
set key right top
set title "Degree of Word"
set xlabel "Degree"
set ylabel "Frequency"
set logscale x
set logscale y
set format x "10^{%L}"
set format y "10^{%L}"
set xrange [100:]
set yrange [1e-8:1e-2]
gam=2.3
b = 9
z(x) = (b/x)**gam
zb(x) = (0.3/x)**1.6
norm = (200.0/50000) / 304085
plot "degree.dat" using 2:(norm * $3) with lines lw 2 title "data", \
"degree.dat" using 2:(z($2)) with lines lw 2 title "degree^{-2.3}", \
"degree.dat" using 2:(zb($2)) with lines lw 2 title "degree^{-1.6}"
#################################################
#
set term png
set out 'degree-fine.png'
# set term postscript eps enhanced color 20
# set out 'degree-fine.eps'
set key right top
set title "Degree of Word"
set xlabel "Degree"
set ylabel "Frequency"
set y2label "Count of Words"
set logscale x
set logscale y
set logscale y2
set format x "10^{%L}"
set format y "10^{%L}"
set format y2 "10^{%L}"
set xrange [1:]
set yrange [1.0/304085:1e5/304085.0]
set y2range [1:1e5]
set y2tics
gam=1.6
b = 1.1
z(x) = (b/x)**gam
norm = 1.0 / 304085
plot "degree-fine.dat" using 2:($3) axes x1y2 with lines lw 2 title "data_{ }", \
"degree-fine.dat" using 2:(z($2)) axes x1y1 with lines lw 2 title "degree^{-1.6}"
unset y2label
unset y2range
unset y2tics
#################################################
#
set term png
set out 'degree-m-fine-raw.png'
# set term postscript eps enhanced color 20
# set out 'degree-m-fine-raw.eps'
set key right top
set title "Count of Vertex Degrees with Multiplicity"
set xlabel "Degree of Word, with Multiplicity"
set ylabel "Count of Words"
set logscale x
set logscale y
set format x "10^{%L}"
set format y "10^{%L}"
set xrange [1:]
unset yrange
set yrange [1:1.2e4]
gam=1.6
b = 5e3
z(x) = (b/x)**gam
norm = 1.0
plot "degree-m-fine.dat" using 2:(norm * $3) with lines lw 2 title "data_{ }", \
"degree-m-fine.dat" using 2:(z($2)) with lines lw 2 title "degree^{-1.6}"
#################################################
#
set term png
set out 'degree-w-fine-raw.png'
# set term postscript eps enhanced color 20
# set out 'degree-w-fine-raw.eps'
set key right top
set title "Count-Weighted Observation Count of Vertex Degrees"
set xlabel "Degree of Word"
set ylabel "Weighted Count of Words"
set logscale x
set logscale y
set format x "10^{%L}"
set format y "10^{%L}"
set xrange [1:]
unset yrange
set yrange [1e4:1e6]
norm = 1.0
plot "degree-w-fine.dat" using 2:(norm * $3) with lines lw 2 title "data_{ }"
#################################################
#
set term png
set out 'degree-p-fine.png'
# set term postscript eps enhanced color 20
# set out 'degree-p-fine.eps'
set key right top
set title "Probability-Weighted Observation Count of Vertex Degrees"
set xlabel "Degree of Word"
set ylabel "Probability-Weighted Count of Words"
set logscale x
set logscale y
set format x "10^{%L}"
set format y "10^{%L}"
set xrange [1:]
unset yrange
set yrange [1e-5:1e-3]
norm = 1.0
plot "degree-lp-fine.dat" using 2:(norm * $3) with lines lw 2 title "Left", \
"degree-rp-fine.dat" using 2:(norm * $3) with lines lw 2 title "Right"
#################################################
#
set term png
set out 'degree-rlogp-fine.png'
# set term postscript eps enhanced color 20
# set out 'degree-rlogp-fine.eps'
set key right top
set title "Log-Probability-Weighted Observation Count of Vertex Degrees"
set xlabel "Degree of Word"
set ylabel "Log-Probability-Weighted Count of Words"
set logscale x
set logscale y
set format x "10^{%L}"
set format y "10^{%L}"
set xrange [1:]
unset yrange
set yrange [1e1:1e6]
norm = 1.0
gam=1.6
b = 2e4
z(x) = (b/x)**gam
plot "degree-rlogp-fine.dat" using 2:(norm * $3) with lines lw 2 title "data", \
"degree-rlogp-fine.dat" using 2:(z($2)) with lines lw 2 title "degree^{-1.6}"
#################################################
#
set term png
set out 'degree-rfent-fine.png'
# set term postscript eps enhanced color 20
# set out 'degree-rfent-fine.eps'
set key right top
set title "Entropy-Weighted Observation Count of Vertex Degrees"
set xlabel "Degree of Word"
set ylabel "Entropy-Weighted Count of Words"
set logscale x
set logscale y
set format x "10^{%L}"
set format y "10^{%L}"
set xrange [1:]
unset yrange
set yrange [1e1:1e6]
norm = 1.0
gam=1.6
b = 2.2e4
z(x) = (b/x)**gam
plot "degree-rfent-fine.dat" using 2:(norm * $3) with lines lw 2 title "data", \
"degree-rfent-fine.dat" using 2:(z($2)) with lines lw 2 title "degree^{-1.6}"
#################################################
#
set term png
set out 'degree-rfmi-fine.png'
# set term postscript eps enhanced color 20
# set out 'degree-rfmi-fine.eps'
set key right top
set title "MI-Weighted Observation Count of Vertex Degrees"
set xlabel "Degree of Word"
set ylabel "MI-Weighted Count of Words"
set logscale x
set logscale y
set format x "10^{%L}"
set format y "10^{%L}"
set xrange [1:]
unset yrange
set yrange [1e0:1e6]
norm = 1.0
gam=1.6
b = 1e4
z(x) = (b/x)**gam
zmi(x) = (5e3/x)**1.8
zmi(x) = (4e3/x)**1.9
plot "degree-rfmi-fine.dat" using 2:(norm * $3) with lines lw 2 title "data", \
"degree-rfmi-fine.dat" using 2:(z($2)) with lines lw 2 title "degree^{-1.6}", \
"degree-rfmi-fine.dat" using 2:(zmi($2)) with lines lw 2 title "degree^{-1.9}"
#################################################
#
set term png
set out 'log2-degree.png'
# set term postscript eps enhanced color 20
# set out 'log2-degree.eps'
set key right top
set title "Degree of Word"
set xlabel "Log_2 Degree"
set ylabel "Frequency"
unset logscale x
set logscale y
unset format x
set format y "10^{%L}"
unset xrange
unset yrange
set yrange [1e-6:]
gam=1.0
b = 10
z(x) = 0.3 * 2**(-gam*x)
z2(x) = 0.09 * 2**(-0.6*x)
norm = 1.0 / 304085
plot "log2-degree.dat" using 2:(norm * $3) with lines lw 2 title "data", \
"log2-degree.dat" using 2:(z($2)) with lines lw 2 title "degree^{-1}", \
"log2-degree.dat" using 2:(z2($2)) with lines lw 2 title "degree^{-0.6}"
#################################################