Delila Program: expgraph

# expgraph program

## Pascal source code: expgraph.p (wget instructions) Instructions on compiling Alphabetic List of Delila Programs Delila Programs by Most Recent Update Please report broken links Copyright Statement for Delila Programs

### Documentation for the expgraph program is below, with links to related programs in the "see also" section.

```{version = 1.07; (* of expgraph.p 2000 June 25}

(* begin module describe.expgraph *)
(*
name
expgraph: make a graph of the exponential function

synopsis
expgraph(input: intty, output: out)

files

input: two numbers, one per line:
number of divisions to plot per integer;
maximum of x (minimum is zero).

output: x versus 2^x in three columns:
first column is 'n' for numerical data or 'p' for places
that should be marked with a circle (ie, nice integer values)
second column is x running from 0 to the maximum of x
third column is 2^x

description

The powers of 2 exponential function.  The same data can be plotted to
give the logarithmic function.

examples

For an exponential graph, the xyplop file to use is:

4   2     zerox zeroy         graph coordinate center
x 0 5     zx min max          (character, real, real) if zx='x' then set xaxis
y 0 32    zy min max          (character, real, real) if zy='y' then set yaxis
5  32 1 1 xinterval yinterval xsubintervals ysubintervals: axis intervals
4 4       xwidth    ywidth    width of numbers in characters
0 0       xdecimal  ydecimal  number of decimal places
15 17     xsize     ysize     size of axes in cm
x
y = 2) show gsave 24 8 translate 0 0 moveto (x) show grestore (
a         zc                  'c' crosshairs, axXyYnN
n 2       zxl base            if zxl='l' then make x axis log to the given base
n 2       zyl base            if zyl='l' then make y axis log to the given base
*********************************************************************
2 3       xcolumn   ycolumn   columns of xyin that determine plot location
1         symbol column       the xyin column to read symbols from
0  0      xscolumn  yscolumn  columns of xyin that determine the symbol size
0 0 0     hue saturation brightness   columns for color manipulation
*********************************************************************
symbol-to-plot      c(circle)bd(dotted box)x+Ifgpr(rectangle)
n         symbol-flag         character in xyin that indicates that this symbol
0.05      symbol sizex        side in inches on the x axis of the symbol.
0.05      symbol sizey        as for the x axis, get size from yscolumn
cl 0.05   no connection (example for connection is c- 0.05 for dashed 0.05 inch)
n  0.05   linetype  size      linetype l.-in and size of dashes or dots
*********************************************************************
c         symbol-to-plot      c(circle)bd(dotted box)x+Ifgpr(rectangle)
p         symbol-flag         character in xyin that indicates that this symbol
0.05      symbol sizex        side in inches on the x axis of the symbol.
0.05      symbol sizey        as for the x axis, get size from yscolumn
nu 0.05   no connection (example for connection is c- 0.05 for dashed 0.05 inch)
n  0.05   linetype  size      linetype l.-in and size of dashes or dots
*********************************************************************
.
**** version 8.50 of xyplop: uses cm for distances

For an logarithmic graph, the xyplop file to use is:

4 2       zerox zeroy         graph coordinate center
x 0 32    zx min max          (character, real, real) if zx='x' then set xaxis
y 0 5     zy min max          (character, real, real) if zy='y' then set yaxis
32 5  1 1 xinterval yinterval number of intervals on axes to plot
4 4       xwidth    ywidth    width of numbers in characters
0 0       xdecimal  ydecimal  number of decimal places
17 15     xsize     ysize     size of axes in inches
x
y = log ) show gsave 34.5 -7 translate 0 0 moveto (2) show grestore ( x
a         zc                  'c' crosshairs, axXyYnN 2^x
n 2       zxl base            if zxl='l' then make x axis log to the given base
n 2       zyl base            if zyl='l' then make y axis log to the given base
*********************************************************************
3 2       xcolumn   ycolumn   columns of xyin that determine plot location
1         symbol column       the xyin column to read symbols from
0  0      xscolumn  yscolumn  columns of xyin that determine the symbol size
0 0 0     hue saturation brightness   columns for color manipulation
*********************************************************************
symbol-to-plot      c(circle)bd(dotted box)x+Ifgpr(rectangle)
n         symbol-flag         character in xyin that indicates that this symbol
0.05      symbol sizex        side in inches on the x axis of the symbol.
0.05      symbol sizey        as for the x axis, get size from yscolumn
cl 0.05   no connection (example for connection is c- 0.05 for dashed 0.05 inch)
n  0.05   linetype  size      linetype l.-in and size of dashes or dots
*********************************************************************
c         symbol-to-plot      c(circle)bd(dotted box)x+Ifgpr(rectangle)
p         symbol-flag         character in xyin that indicates that this symbol
0.05      symbol sizex        side in inches on the x axis of the symbol.
0.05      symbol sizey        as for the x axis, get size from yscolumn
nu 0.05   no connection (example for connection is c- 0.05 for dashed 0.05 inch)
n  0.05   linetype  size      linetype l.-in and size of dashes or dots
*********************************************************************
.
*********************************************************************

documentation

See direct pointers below.

A figure created by these two graphs (with 100 divisions) are used in
the Information Theory Primer,
http://www.lecb.ncifcrf.gov/~toms/paper/primer

Example input files:
exponential xyplop: expgraph.exponential.xyplop
logarithmic xyplop: expgraph.logarithmic.xyplop

The program used to plot the graph is  xyplo.p

author

Thomas Dana Schneider

bugs

none known

*)
(* end module describe.expgraph *)
{This manual page was created by makman 1.44}
```