GSL-HISTOGRAM(1)
π GSL-HISTOGRAM π
okay so bestie, we're looking at the General Commands Manual page for gsl-histogram, and honestly? it's a little cutie. let's get into it π
β¨ NAME β¨
gsl-histogram β it computes a histogram of data coming in on stdin. that's it. that's the whole job. queen behavior π
β¨ SYNOPSYS β¨
gsl-histogram xmin xmax [n]
(no bestie, "SYNOPSYS" isn't my typo, that's literally what it says up top, we're keeping it, it's canon now π)
β¨ DESCRIPTION β¨
so gsl-histogram is a demonstration program for the GNU Scientific Library. think of it as the library showing off its fit. π«Ά
it takes three arguments:
- the lower bound of the histogram (
xmin) - the upper bound of the histogram (
xmax) - the number of bins (
n)
then it just... reads numbers from stdin, one line at a time, and adds them to the histogram. no drama, no fuss, she's just vibing and counting. πΈ
when there's no more data to read, it prints out the accumulated histogram using gsl_histogram_fprintf. iconique.
and here's the little detail you don't wanna miss: if n is unspecified, then bins of integer width are used. periodt. π
β¨ EXAMPLE β¨
okay here's a whole example, walk with me πΆββοΈβ¨
we generate 10000 random samples from a Cauchy distribution with a width of 30, and we histogram them over the range -100 to 100, using 200 bins. slay.
gsl-randist 0 10000 cauchy 30 | gsl-histogram -100 100 200 > histogram.dat
a plot of the resulting histogram will show the familiar shape of the Cauchy distribution with fluctuations caused by the finite sample size. like, the vibe is there, the little wobbles are just the sample size being a finite little guy. no cap. π
awk '{print $1, $3 ; print $2, $3}' histogram.dat | graph -T X
β¨ SEE ALSO β¨
go read those too bestie, they're in the same friend group π¦
β¨ AUTHOR β¨
gsl-histogram was written by Brian Gough. Copyright 1996-2000; for copying conditions see the GNU General Public Licence. π
this manual page was added by the Dirk Eddelbuettel <edd@debian.org>, the Debian GNU/Linux maintainer for GSL. shoutout to him fr fr π
and that's a wrap on the page, bestie!! this came to you from GNU and it lives under the name GSL-HISTOGRAM(1) πβ¨π go histogram something iconic today, ily π«Άππ
π¦ where this page comes from
- alpine 3.24: gsl-doc 2.8-r0 Β· GPL-3.0-or-later
- arch rolling: gsl 2.8-1 Β· GPL-3.0-only
- centos-stream 9: gsl 2.6-7.el9 Β· GPLv3+
- centos-stream 9: gsl 2.6-7.el9 Β· GPLv3+
- debian bookworm: gsl-bin 2.7.1+dfsg-5+deb12u1
- debian trixie: gsl-bin 2.8+dfsg-5
- epel 10: gsl 2.7.1-13.el10_2 Β· GPL-3.0-or-later
- fedora 43: gsl 2.8-2.fc43 Β· GPL-3.0-or-later
- fedora 43: gsl 2.8-2.fc43 Β· GPL-3.0-or-later
- fedora 44: gsl 2.8-3.fc44 Β· GPL-3.0-or-later
- fedora 44: gsl 2.8-3.fc44 Β· GPL-3.0-or-later
- nixos 26.05: gsl 2.8
- nixpkgs unstable: gsl 2.8
- opensuse-leap 16.0: gsl 2.8-160000.2.2 Β· GPL-3.0-or-later
- opensuse-leap 16.0: gsl 2.8-160000.2.2 Β· GPL-3.0-or-later
- opensuse-leap 16.0: gsl 2.8-160000.2.2 Β· GPL-3.0-or-later
- opensuse-leap 16.0: gsl 2.8-160000.2.2 Β· GPL-3.0-or-later
- ubuntu jammy: gsl-bin 2.7.1+dfsg-3
- ubuntu noble: gsl-bin 2.7.1+dfsg-6ubuntu2
- ubuntu questing: gsl-bin 2.8+dfsg-5.1ubuntu1
- ubuntu resolute: gsl-bin 2.8+dfsg-6
- ubuntu stonking: gsl-bin 2.8+dfsg-6ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms