-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathdensity.gplot
123 lines (100 loc) · 3.31 KB
/
density.gplot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# 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}"
#################################################