.TH HISTOGRAM 8.SH NAMEhistogram \- draw a histogram.SH SYNOPSIS.B histogram[.B -h][.B -c.I index][.B -r.I minx,miny,maxx,maxy][.B -s.I scale][.B -t.I title][.B -v.I maxv].SH DESCRIPTION.I Histogramreads numbers, one per line, from its standard inputand draws them as bars in a histogram..PPUse.B -cto set the color.I indexfor the graph.A modulus operation on the value keeps the color index within the available range..PPUnless.B -h.RI ( hold )is given,.I histogramwill exit when it reaches the end-of-file.It will exit immediately if it is interruptedor if the.I exitmenu option is chosen..PP.B -rsets the initial window.I rectanglecoordinates..PP.B -ssets the.I scalingfactor..PP.B -tsets the.I titledisplayed on a line above the histogram.The last value read is displayed to the right of the title..PP.B -vsets the maximum.I valuethat can be expected..SH EXAMPLEPlot a sine wave:.IP.EXhoc -e 'for(i=0.0;i<20*PI;i=i+0.1) print (10+10*sin(i)), "\\n"'| histogram -t 'sin(t), 0 ≤ t ≤ 20π' -v 20 -h.EE.PPShow the Dow Jones adjusted daily closing price back to January 1, 2000:.IP.EXsite=http://ichart.finance.yahoo.comhget $site'/table.csv?s=^DJI&a=00&b=1&c=2000' | awk -F, '{print $NF}' | histogram -t DJI -v 15000 -h.EE.SH SOURCE.B /sys/src/cmd/histogram.c.SH SEE ALSO.IR statusbar (8)
.TH HISTOGRAM 8
.SH NAME
histogram \- draw a histogram
.SH SYNOPSIS
.B histogram
[
.B -h
]
[
.B -c
.I index
]
[
.B -r
.I minx,miny,maxx,maxy
]
[
.B -s
.I scale
]
[
.B -t
.I title
]
[
.B -v
.I maxv
]
.SH DESCRIPTION
.I Histogram
reads numbers, one per line, from its standard input
and draws them as bars in a histogram.
.PP
Use
.B -c
to set the color
.I index
for the graph.
A modulus operation on the value keeps the color index within the available range.
.PP
Unless
.B -h
.RI ( hold )
is given,
.I 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 -s
sets the
.I scaling
factor.
.PP
.B -t
sets the
.I title
displayed on a line above the histogram.
The last value read is displayed to the right of the title.
.PP
.B -v
sets the maximum
.I value
that can be expected.
.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"'|
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
site=http://ichart.finance.yahoo.com
hget $site'/table.csv?s=^DJI&a=00&b=1&c=2000' |
awk -F, '{print $NF}' | histogram -t DJI -v 15000 -h
.EE
.SH SOURCE
.B /sys/src/cmd/histogram.c
.SH SEE ALSO
.IR statusbar (8)