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