date and time created 91/01/17 18:24:03 by bostic
[unix-history] / usr / src / usr.bin / graph / graph.1
CommitLineData
d9d7a9f0
CL
1.\" Copyright (c) 1990 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
43f216ce 4.\"
5325ced3 5.\" @(#)graph.1 6.3 (Berkeley) %G%
d9d7a9f0
CL
6.\"
7.Dd
8.Dt GRAPH 1
9.Os ATT 7th
10.Sh NAME
11.Nm graph
12.Nd draw a graph
13.Sh SYNOPSIS
14.Nm graph
15.Op option
16\&...
17.Sh DESCRIPTION
18.Nm Graph
43f216ce
KM
19with no options takes pairs of numbers from the
20standard input as abscissas and
21ordinates of a graph.
22Successive points are connected by straight lines.
23The graph is encoded on the standard output
24for display by the
d9d7a9f0 25.Xr plot 1
43f216ce 26filters.
d9d7a9f0 27.Pp
43f216ce
KM
28If the coordinates of a point are followed by
29a nonnumeric string, that string is printed as a
30label beginning on the point.
31Labels may be surrounded with quotes "...", in
32which case they may be empty or contain blanks
33and numbers;
34labels never contain newlines.
d9d7a9f0 35.Pp
43f216ce
KM
36The following options are recognized,
37each as a separate argument.
d9d7a9f0
CL
38.Tw Fl
39.Tp Fl a
43f216ce
KM
40Supply abscissas automatically (they are missing from
41the input); spacing is given by the next
42argument (default 1).
43A second optional argument is the starting point for
44automatic abscissas (default 0 or lower limit given by
d9d7a9f0
CL
45.Fl x ) .
46.Tp Fl b
43f216ce 47Break (disconnect) the graph after each label in the input.
d9d7a9f0 48.Tp Fl c
43f216ce
KM
49Character string given by next argument
50is default label for each point.
d9d7a9f0 51.Tp Fl g
43f216ce
KM
52Next argument is grid style,
530 no grid, 1 frame with ticks, 2 full grid (default).
d9d7a9f0 54.Tp Fl l
43f216ce 55Next argument is label for graph.
d9d7a9f0 56.Tp Fl m
43f216ce
KM
57Next argument is mode (style)
58of connecting lines:
590 disconnected, 1 connected (default).
60Some devices give distinguishable line styles
61for other small integers.
d9d7a9f0 62.Tp Fl s
43f216ce 63Save screen, don't erase before plotting.
d9d7a9f0
CL
64.Tc Fl x
65.Ws
66.Op Ar l
67.Cx
43f216ce 68If
d9d7a9f0 69.Ar l
43f216ce
KM
70is present, x axis is logarithmic.
71Next 1 (or 2) arguments are lower (and upper)
d9d7a9f0 72.Ar x
43f216ce 73limits.
d9d7a9f0
CL
74Third argument, if present, is grid spacing on
75.Ar x
43f216ce
KM
76axis.
77Normally these quantities are determined automatically.
d9d7a9f0
CL
78.Tc Fl y
79.Ws
80.Op Ar l
81.Cx
43f216ce 82Similarly for
d9d7a9f0
CL
83.Ar y .
84.Tp Fl h
43f216ce 85Next argument is fraction of space for height.
d9d7a9f0 86.Tp Fl w
43f216ce 87Similarly for width.
d9d7a9f0 88.Tp Fl r
43f216ce 89Next argument is fraction of space to move right before plotting.
d9d7a9f0 90.Tp Fl u
43f216ce 91Similarly to move up before plotting.
d9d7a9f0 92.Tp Fl t
43f216ce
KM
93Transpose horizontal and vertical axes.
94(Option
d9d7a9f0 95.Fl x
43f216ce 96now applies to the vertical axis.)
d9d7a9f0
CL
97.Tp
98.Pp
43f216ce
KM
99A legend indicating grid range is produced
100with a grid unless the
d9d7a9f0 101.Fl s
43f216ce 102option is present.
d9d7a9f0 103.Pp
43f216ce
KM
104If a specified lower limit exceeds the upper limit,
105the axis
106is reversed.
d9d7a9f0
CL
107.Sh SEE ALSO
108.Xr spline 1 ,
109.Xr plot 1
110.Sh HISTORY
111.Nm Plot
112appeared in Version 6 AT&T Unix.
113.Sh BUGS
114.Nm Graph
43f216ce
KM
115stores all points internally and drops those for which
116there isn't room.
d9d7a9f0 117.Pp
43f216ce 118Segments that run out of bounds are dropped, not windowed.
d9d7a9f0 119.Pp
43f216ce 120Logarithmic axes may not be reversed.