Blame doc/gsl-histogram.1
|
Packit |
67cb25 |
.\" Man page contributed by Dirk Eddelbuettel <edd@debian.org>
|
|
Packit |
67cb25 |
.\" and released under the GNU General Public License
|
|
Packit |
67cb25 |
.TH GSL-HISTOGRAM 1 "" GNU
|
|
Packit |
67cb25 |
.SH NAME
|
|
Packit |
67cb25 |
gsl-histogram - compute histogram of data on stdin
|
|
Packit |
67cb25 |
.SH SYNOPSYS
|
|
Packit |
67cb25 |
.B gsl-histogram xmin xmax [n]
|
|
Packit |
67cb25 |
.SH DESCRIPTION
|
|
Packit |
67cb25 |
.B gsl-histogram
|
|
Packit |
67cb25 |
is a demonstration program for the GNU Scientific Library.
|
|
Packit |
67cb25 |
It takes three arguments, specifying the upper and lower bounds of the
|
|
Packit |
67cb25 |
histogram and the number of bins. It then reads numbers from `stdin',
|
|
Packit |
67cb25 |
one line at a time, and adds them to the histogram. When there is no
|
|
Packit |
67cb25 |
more data to read it prints out the accumulated histogram using
|
|
Packit |
67cb25 |
gsl_histogram_fprintf. If n is unspecified then bins of integer width
|
|
Packit |
67cb25 |
are used.
|
|
Packit |
67cb25 |
.SH EXAMPLE
|
|
Packit |
67cb25 |
Here is an example. We generate 10000 random samples from a Cauchy
|
|
Packit |
67cb25 |
distribution with a width of 30 and histogram them over the range -100 to
|
|
Packit |
67cb25 |
100, using 200 bins.
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
gsl-randist 0 10000 cauchy 30 | gsl-histogram -100 100 200 > histogram.dat
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
A plot of the resulting histogram will show the familiar shape of the
|
|
Packit |
67cb25 |
Cauchy distribution with fluctuations caused by the finite sample
|
|
Packit |
67cb25 |
size.
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
awk '{print $1, $3 ; print $2, $3}' histogram.dat | graph -T X
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
.SH SEE ALSO
|
|
Packit |
67cb25 |
.BR gsl(3) ,
|
|
Packit |
67cb25 |
.BR gsl-randist(1) .
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
.SH AUTHOR
|
|
Packit |
67cb25 |
.B gsl-histogram
|
|
Packit |
67cb25 |
was written by Brian Gough.
|
|
Packit |
67cb25 |
Copyright 1996-2000; for copying conditions see the GNU General
|
|
Packit |
67cb25 |
Public Licence.
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
This manual page was added by the Dirk Eddelbuettel
|
|
Packit |
67cb25 |
<edd@debian.org>, the Debian GNU/Linux maintainer for
|
|
Packit |
67cb25 |
.BR GSL .
|