90 lines · 1.3 KB · Text
RawDownload
.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)