1GSL-HISTOGRAM(1) General Commands Manual GSL-HISTOGRAM(1)
2
3
4
6 gsl-histogram - compute histogram of data on stdin
7
9 gsl-histogram xmin xmax [n]
10
12 gsl-histogram is a demonstration program for the GNU Scientific
13 Library. It takes three arguments, specifying the upper and lower
14 bounds of the histogram and the number of bins. It then reads numbers
15 from `stdin', one line at a time, and adds them to the histogram. When
16 there is no more data to read it prints out the accumulated histogram
17 using gsl_histogram_fprintf. If n is unspecified then bins of integer
18 width are used.
19
21 Here is an example. We generate 10000 random samples from a Cauchy
22 distribution with a width of 30 and histogram them over the range -100
23 to 100, using 200 bins.
24
25 gsl-randist 0 10000 cauchy 30 | gsl-histogram -100 100 200 > his‐
26 togram.dat
27
28 A plot of the resulting histogram will show the familiar shape of the
29 Cauchy distribution with fluctuations caused by the finite sample size.
30
31 awk '{print $1, $3 ; print $2, $3}' histogram.dat | graph -T X
32
33
35 gsl(3), gsl-randist(1).
36
37
39 gsl-histogram was written by Brian Gough. Copyright 1996-2000; for
40 copying conditions see the GNU General Public Licence.
41
42 This manual page was added by the Dirk Eddelbuettel <edd@debian.org>,
43 the Debian GNU/Linux maintainer for GSL.
44
45
46
47GNU GSL-HISTOGRAM(1)