OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-learn / learn-lang-diary / p6-density / density.gplot

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

#################################################
#
set term png
set out 'density.png'
# set term postscript eps enhanced color 20
# set out 'density.eps'
set key left top
set title "Density of States {/Symbol r}(E)"
set xlabel "E"
set ylabel "{/Symbol r}(E)"
set logscale y
set format y "10^{%L}"
# set yrange [1e-7:0.3]

a=1
z(x) = 2**(a*(x-30))

norm = (200.0/23) / 28184319

plot "density.dat" using 2:(norm * $3) with lines lw 2 title "data_{ }", \
     "density.dat" using 2:(z($2)) with lines lw 2 title "2^{E-30}"

#################################################
#
set term png
# set out 'density-relative.png'
set term postscript eps enhanced color 20
set out 'density-relative.eps'
set key left top
set title "Relative Density of States {/Symbol r}(E)"
set xlabel "E"
set ylabel "{/Symbol r}(E) 2^{E-26}"
set logscale y
set format y "10^{%L}"
# set yrange [1e-7:0.3]
unset yrange

a=1
z(x) = 2**(a*(x-26))

norm = (200.0/23) / 28184319

g(x,m,s) = (1/sqrt(2*3.14159*s)) * exp(- (x-m)**2 / (2*s**2))

plot "density.dat" using 2:(norm * $3 / z($2)) with lines lw 2 title "data_{ }", \
     "density.dat" using 2:(g($2,18,6)) with lines lw 2 title "Gauss(18,6)"

#################################################
#
set term png
set out 'density-marg.png'
# set term postscript eps enhanced color 20
# set out 'density-marg.eps'
set key left top
set title "Density of Marginal Probabilites"
set xlabel "E = -log_2 p(i,j)"
set ylabel "{/Symbol r}_p(E)"
set logscale y
set format y "10^{%L}"
set yrange [1e-6:1]

a=1
z(x) = 2**(a*(x-26))

lnorm = (200.0/23) / 61306.73953973119
rnorm = (200.0/23) / 50028.07548126771

plot "density-leftp.dat" using 2:(lnorm * $3) with lines lw 2 title "Left marginal", \
     "density-rightp.dat" using 2:(rnorm * $3) with lines lw 2 title "Right marginal", \
     "density-rightp.dat" using 2:(z($2)) with lines lw 2 title "2^{E-26}"

#################################################
#
set term png
set out 'density-lmarg-logli.png'
# set term postscript eps enhanced color 20
# set out 'density-lmarg-logli.eps'
set key left top
set title "Density of Marginals"
set xlabel "E = -log_2 p(i,j)"
set ylabel "Frequency"
set logscale y
set format y "10^{%L}"
set yrange [1e-7:1]

a=1
z(x) = 2**(a*(x-30))

lglnorm = (200.0/23) / 432821575.7291378
fentnorm = (200.0/23) / 625117539.7084644
lfminorm = (200.0/23) / 83146762.95191137

plot "density-lmarg-logli.dat" using 2:(lglnorm * $3) with lines lw 2 title "Log Left Marginal Probability", \
     "density-lmarg-fent.dat" using 2:(fentnorm * $3) with lines lw 2 title "Left Fractional Entropy", \
     "density-lmarg-fmi.dat" using 2:(lfminorm * $3) with lines lw 2 title "Left Marginal MI", \
     "density-lmarg-logli.dat" using 2:(z($2)) with lines lw 2 title "2^{E-30}"


#################################################
#
set term png
set out 'density-fmi.png'
# set term postscript eps enhanced color 20
# set out 'density-fmi.eps'
set key left top
set title "Density of MI"
set xlabel "E = -log_2 p(i,j)"
set ylabel "{/Symbol r}_{MI}(E)"
set logscale y
set format y "10^{%L}"
set yrange [1e-7:1]

a=1
z(x) = 2**(a*(x-30))

minorm = (200.0/23) / 80135959.88715933

plot "density-fmi.dat" using 2:(minorm * $3) with lines lw 2 title "MI", \
     "density-fmi.dat" using 2:(z($2)) with lines lw 2 title "2^{E-30}"

#################################################