BSD 3 development
[unix-history] / usr / man / man1 / graph.1g
CommitLineData
e6817382
BJ
1.TH GRAPH 1G
2.SH NAME
3graph \- draw a graph
4.SH SYNOPSIS
5.B graph
6[ option ] ...
7.SH DESCRIPTION
8.I Graph
9with no options takes pairs of numbers from the
10standard input as abscissas and
11ordinates of a graph.
12Successive points are connected by straight lines.
13The graph is encoded on the standard output
14for display by the
15.IR plot (1)
16filters.
17.PP
18If the coordinates of a point are followed by
19a nonnumeric string, that string is printed as a
20label beginning on the point.
21Labels may be surrounded with quotes "...", in
22which case they may be empty or contain blanks
23and numbers;
24labels never contain newlines.
25.PP
26The following options are recognized,
27each as a separate argument.
28.TP
29.B \-a
30Supply abscissas automatically (they are missing from
31the input); spacing is given by the next
32argument (default 1).
33A second optional argument is the starting point for
34automatic abscissas (default 0 or lower limit given by
35.BR \-x ).
36.TP
37.B \-b
38Break (disconnect) the graph after each label in the input.
39.TP
40.B \-c
41Character string given by next argument
42is default label for each point.
43.TP
44.B \-g
45Next argument is grid style,
460 no grid, 1 frame with ticks, 2 full grid (default).
47.TP
48.B \-l
49Next argument is label for graph.
50.TP
51.B \-m
52Next argument is mode (style)
53of connecting lines:
540 disconnected, 1 connected (default).
55Some devices give distinguishable line styles
56for other small integers.
57.TP
58.B \-s
59Save screen, don't erase before plotting.
60.TP
61\fB\-x\fR [ \fBl\fR ]
62If
63.B l
64is present, x axis is logarithmic.
65Next 1 (or 2) arguments are lower (and upper)
66.IR x ""
67limits.
68Third argument, if present, is grid spacing on
69.I x
70axis.
71Normally these quantities are determined automatically.
72.TP
73\fB\-y\fR [ \fBl\fR ]
74Similarly for
75.IR y .
76.TP
77.B \-h
78Next argument is fraction of space for height.
79.TP
80.B \-w
81Similarly for width.
82.TP
83.B \-r
84Next argument is fraction of space to move right before plotting.
85.TP
86.B \-u
87Similarly to move up before plotting.
88.TP
89.B \-t
90Transpose horizontal and vertical axes.
91(Option
92.B \-x
93now applies to the vertical axis.)
94.PP
95A legend indicating grid range is produced
96with a grid unless the
97.B \-s
98option is present.
99.PP
100If a specified lower limit exceeds the upper limit,
101the axis
102is reversed.
103.SH "SEE ALSO"
104spline(1), plot(1)
105.SH BUGS
106.I Graph
107stores all points internally and drops those for which
108there isn't room.
109.br
110Segments that run out of bounds are dropped, not windowed.
111.br
112Logarithmic axes may not be reversed.