OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-learn / learn-lang-diary / p5-entropy / rank-entropy.gplot

48 lines · gplot ref:
# set term png small color

#################################################
#
set term png
set out 'rank-wfreq.png'
# set term postscript eps enhanced color 20
# set out 'rank-wfreq.eps'
set key right top
set title "Ranked Word Marginal Frequency P(w,*)"
set xlabel "Rank"
set ylabel "Frequency"
set logscale x
set logscale y
set format x "10^{%L}"
set format y "10^{%L}"
set yrange [1e-7:0.3]

p=1.15
a=0.2
z(x) = a*x**(-p)

plot "rank-wfreq.dat" using 1:2 with lines lw 2 title "data", \
     "rank-wfreq.dat" using 1:(z($1)) with lines lw 2 title "rank^{-1.15}"

#################################################
## #
## # set term png
## # set out 'rank-went.png'
## set term postscript eps enhanced color 20
## set out 'rank-went.eps'
## set key right top
## set title "Ranked Word Marginal Entropy H_{right}"
## set xlabel "Rank"
## set ylabel "Entropy (bits)"
## set logscale x
## set logscale y
## set format x "10^{%L}"
## set format y "10^{%L}"
## set yrange [3e-6:5]
## 
## p=1.2
## a=4
## z(x) = a*x**(-p)
## 
## plot "rank-went.dat" using 1:2 with lines lw 2 title "data", \
##      "rank-went.dat" using 1:(z($1)) with lines lw 2 title "rank^{-1.1}"