]> git.lizzy.rs Git - plan9front.git/blob - sys/man/8/histogram
kbdfs: allow to escape ctlr-alt-del with shift for vmx and vnc.
[plan9front.git] / sys / man / 8 / histogram
1 .TH HISTOGRAM 8
2 .SH NAME
3 histogram \- draw a histogram
4 .SH SYNOPSIS
5 .B histogram
6 [
7 .B -h
8 ]
9 [
10 .B -c
11 .I index
12 ]
13 [
14 .B -r
15 .I minx,miny,maxx,maxy
16 ]
17 [
18 .B -s
19 .I scale
20 ]
21 [
22 .B -t
23 .I title
24 ]
25 [
26 .B -v
27 .I maxv
28 ]
29 .SH DESCRIPTION
30 .I Histogram
31 reads numbers, one per line, from its standard input
32 and draws them as bars in a histogram.
33 .PP
34 Use
35 .B -c
36 to set the color
37 .I index
38 for the graph.
39 A modulus operation on the value keeps the color index within the available range.
40 .PP
41 Unless
42 .B -h
43 .RI ( hold )
44 is given,
45 .I histogram
46 will exit when it reaches the end-of-file.
47 It will exit immediately if it is interrupted
48 or if the
49 .I exit
50 menu option is chosen.
51 .PP
52 .B -r
53 sets the initial window
54 .I rectangle
55 coordinates.
56 .PP
57 .B -s
58 sets the
59 .I scaling
60 factor.
61 .PP
62 .B -t
63 sets the
64 .I title
65 displayed on a line above the histogram.
66 The last value read is displayed to the right of the title.
67 .PP
68 .B -v
69 sets the maximum
70 .I value
71 that can be expected.
72 .SH EXAMPLE
73 Plot a sine wave:
74 .IP
75 .EX
76 hoc -e 'for(i=0.0;i<20*PI;i=i+0.1) print (10+10*sin(i)), "\\n"'|
77         histogram -t 'sin(t), 0 ≤ t ≤ 20π' -v 20 -h
78 .EE
79 .PP
80 Show the Dow Jones adjusted daily closing price back to January 1, 2000:
81 .IP
82 .EX
83 site=http://ichart.finance.yahoo.com
84 hget $site'/table.csv?s=^DJI&a=00&b=1&c=2000' |
85         awk -F, '{print $NF}' | histogram -t DJI -v 15000 -h
86 .EE
87 .SH SOURCE
88 .B /sys/src/cmd/histogram.c
89 .SH SEE ALSO
90 .IR statusbar (8)