index.txt
HISTOGRAM(8) System Manager's Manual HISTOGRAM(8) NAME histogram - draw a histogram SYNOPSIS histogram [ -h ] [ -c index ] [ -r minx,miny,maxx,maxy ] [ -s scale ] [ -t title ] [ -v maxv ] DESCRIPTION Histogram reads numbers, one per line, from its standard input and draws them as bars in a histogram. Use -c to set the color index for the graph. A modulus operation on the value keeps the color index within the available range. Unless -h (hold) is given, histogram will exit when it reaches the end- of-file. It will exit immediately if it is interrupted or if the exit menu option is chosen. -r sets the initial window rectangle coordinates. -s sets the scaling factor. -t sets the title displayed on a line above the histogram. The last value read is displayed to the right of the title. -v sets the maximum value that can be expected. EXAMPLE Plot a sine wave: 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 Show the Dow Jones adjusted daily closing price back to January 1, 2000: 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 SOURCE /sys/src/cmd/histogram.c SEE ALSO statusbar(8) HISTOGRAM(8)