Delila Program: genhis

genhis program

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

{   version = 1.95; (* of genhis.p 2013 Apr 05}

(* begin module describe.genhis *)
(*
name
      genhis: general histogram plotter

synopsis
      genhis(data: in, histog: out, genhisp: in, curve: out, output: out)

files
      data:  File of numbers to be histogrammed.  Header lines that begin with
  '*' may be copied from this file to 'histog' or may be skipped.  The
  column from which to read the data may also be specified.  See the
  description of the file 'genhisp' to see how to do this.  Once the
  data region has begun, (that is, there is at least one non '*' line),
  then lines that begin with '*' are also skipped.
         Lines that are blank or for which there *is* no data column
         (because one asked for a column further out than is supplied)
         are skipped.  Data are only separated by spaces or by tabs.
         Other control characters are not separaters.

      histog: the output histogram.  contains the header lines copied from
         file 'data', plus data about the numbers (min, max, mean, variance
         and st. dev.), and the plot.  may also contain a standard plot.

      genhisp: parameter input file.  this is used to change any of the
         parameters from default values.  any may be changed and they can
         be specified in any order.  the first character on a line tells
         what parameter is to be set, the other information sets it.  the
         parameters that can be changed, and their line codes:
         h - sets header reading;  this is followed by two integers, the
            first specifying the number of lines to copy and the second the
            number of lines to skip;  if the first number is <0 those lines
            beginning with '*' are copied;  default is -1 0.
         c - sets the column of data that is to be analyzed and plotted;
            the default is column 1;  note: a column is any string
            of nonblank characters; columns are separated by blanks;
         p - sets the standard plot;  poisson and gaussian plots are
            available and are specified by following the p by either p or g.

            NEW: 2006 Nov 15:
            Capital P or G means provide the curve data in the histog.

         x - sets the x-axis scale; this is to be followed by either an n
            or an s, and then a number;  if n, then the number of intervals
            on the x-axis is set; if s, then the size of intervals is set;
            default is to set the number of intervals to constant 'defslots'.
         r - sets the range of data to be plotted;  this is followed by two
            numbers which specify the subrange of the data for which the plot
            is desired;  default is to plot all the data.
         d - sets the number of decimal places in the output histog
         w - sets the width of numbers in the output histog
         n - sets the width of counts in the output histog

         f - turns on a third data column with the frequency of data
             in each bin.  The width and decimal default to those
             given by d and w unless the user adds two more data items
             on the line for them after the 'f'.

      curve: gives the standard plot curve as position and value

      output: for messages to the user.

description
      This program takes numerical data from a file and plots a histogram of
      those data.  It also calculates the min, max, mean and variance of the
      data.  If desired, the user may get a standard plot, based on the mean
      and variance, plotted along with the data.  The user may specify the size
      or number of intervals on the x-axis.  The y-axis is automatically scaled
      to fit on a page.  The scaling factor is reported to the user.

example
      try file datat7
      with genhisp of
         x n 20
         p g

see also
      Program to plot the graph in postscript: genpic.p
      An x-y plotting program: xyplo.p

author
      Gary Stormo

bugs
      Try different x axis intervals:  regular spikes can be data artifacts!

      MAJOR BUG:  If the data column has identical values, then the program
      goes into an infinite loop and will generate an infinite sized histog file.
      Fortunately this is not an interesting histogram ...

technical notes
      The constant 'pageheight' is used to set the scaling factor so that
      the plots do not exceede the size of a page.

      As of 1994 Aug 10 the SEM is calculated by dividing the standard
      deviation by sqrt(n-1).
*)
(* end module describe.genhis *)
{This manual page was created by makman 1.44}
{created by htmlink 1.55}
National Cancer Institute    National Institutes of Health    Health and Human Services    USA Gov - Official Web Portal    Viewing Files    Accessibility