~ubuntu-branches/ubuntu/trusty/enblend-enfuse/trusty

« back to all changes in this revision

Viewing changes to doc/entropy.gp.in

  • Committer: Package Import Robot
  • Author(s): Jackson Doak
  • Date: 2014-01-22 06:23:44 UTC
  • mfrom: (5.1.6 sid)
  • Revision ID: package-import@ubuntu.com-20140122062344-gdj5nf671oxprqq7
Tags: 4.1.2+dfsg-2ubuntu1
* Merge from Debian, remaining changes:
  - Build-depend on libglew-dev rather than libglew1.5-dev | libglew1.4-dev
    | libglew-dev.
  - Build using -O1 on arm

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Plot entropy with respect to base 2
2
2
 
 
3
 
3
4
load "@srcdir@/config.gp"
4
5
 
5
 
Base = 2.0
6
 
lb(x) = log(x) / log(Base)
 
6
 
 
7
_Base = 2.0
 
8
lb(x) = log(x) / log(_Base)
 
9
 
 
10
 
7
11
Entropy(x) = -x * lb(x) - (1.0 - x) * lb(1.0 - x)
8
12
 
 
13
 
 
14
set samples 1023
9
15
set xlabel "p"
10
16
set xtics 0.2
11
17
set ylabel "H_2(p)"
12
18
set ytics 0.2
13
19
 
 
20
 
14
21
set terminal unknown
15
22
plot [p = 0:1] Entropy(p)
16
23
 
18
25
set terminal dumb Dumb_Width Dumb_Height enhanced
19
26
replot
20
27
 
21
 
set output "entropy.png"
22
 
set terminal png font FreeSans 10 size Png_Width, Png_Height enhanced
23
 
replot
24
 
 
25
28
set output "entropy.eps"
26
29
set terminal postscript eps enhanced
27
30
replot
28
31
 
 
32
set output "entropy.svg"
 
33
set terminal svg size Svg_Width, Svg_Height dynamic enhanced
 
34
replot
 
35
 
29
36
# Newer Gnuplots have a "pdf" terminal.
30
37
set output "| ps2pdf -dEPSCrop - entropy.pdf"
31
 
set terminal postscript eps enhanced
 
38
set terminal postscript eps size Pdf_Width, Pdf_Height enhanced
 
39
replot
 
40
 
 
41
set output "@RASTER_DIR@/entropy.png"
 
42
set terminal png transparent size Png_Width, Png_Height enhanced
32
43
replot