Plan 9 from Bell Labs’s /usr/web/sources/contrib/fst/root/sys/man/8/histogram

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


.TH histogram 8
.SH NAME
histogram \- show a histogram of input values
.SH SYNOPSIS
.B aux/histogram
[
.B -v
.I maxv
]
[
.B -t
.I title
]
[
.B -s
.I scale
]
[
.B -r
.I minx,miny,maxx,maxy
]
[
.B -c
.I color index
]
[
.B -h
]
[
.B -t
.I title
]
.SH DESCRIPTION
.I Aux/histogram
reads newline-separated numerical values on its standard input
and displays them as bars in a histogram.
.PP
.B -t
sets the
.I title
that is displayed on a line above the bar graph.  The last value read
is displayed to the right of the title.
.PP
Unless the
.B -h
(
.I hold
) is given, histogram will exit when it reaches the end-of-file.
It will exit immediately if it is interrupted
or if the
.I exit
menu option is chosen.
.PP
.B -r
sets the initial window
.I rectangle
coordinates.
.PP
.B -v
sets the maximum
.I value
that can be expected.
.PP
.B -s
sets the
.I scaling
factor.
.PP
Use
.B -c
to set the
.I color
index for the graph. A modulo operation on the value, keeps color index within the available
range.
.SH EXAMPLE
Plot a sine wave:
.IP
.EX
hoc -e 'for(i=0.0;i<20*PI;i=i+0.1) print (10+10*sin(i)), "\\n"'|
aux/histogram -t 'sin(t), 0 ≤ t ≤ 20π' -v 20 -h
.EE
.PP
Show the Dow Jones adjusted daily closing price back to January 1, 2000:
.IP
.EX
hget 'http://ichart.finance.yahoo.com/table.csv?s=^DJI&a=00&b=1&c=2000' |
awk -F, '{print $NF;}' |
aux/histogram -t DJI -v 15000 -h
.EE
.SH SOURCE
.B /sys/src/cmd/aux/histogram.c
.SH SEE ALSO
.IR statusbar (8).
.SH BUGS
Report bugs to
.I 9nut.

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.