xref: /csrg-svn/usr.bin/graph/graph.1 (revision 43693)
1*43693Scael.\" Copyright (c) 1990 Regents of the University of California.
2*43693Scael.\" All rights reserved.  The Berkeley software License Agreement
3*43693Scael.\" specifies the terms and conditions for redistribution.
419421Smckusick.\"
5*43693Scael.\"     @(#)graph.1	6.2 (Berkeley) 06/24/90
6*43693Scael.\"
7*43693Scael.Dd
8*43693Scael.Dt GRAPH 1
9*43693Scael.Os ATT 7th
10*43693Scael.Sh NAME
11*43693Scael.Nm graph
12*43693Scael.Nd draw a graph
13*43693Scael.Sh SYNOPSIS
14*43693Scael.Nm graph
15*43693Scael.Op option
16*43693Scael\&...
17*43693Scael.Sh DESCRIPTION
18*43693Scael.Nm Graph
1919421Smckusickwith no options takes pairs of numbers from the
2019421Smckusickstandard input as abscissas and
2119421Smckusickordinates of a graph.
2219421SmckusickSuccessive points are connected by straight lines.
2319421SmckusickThe graph is encoded on the standard output
2419421Smckusickfor display by the
25*43693Scael.Xr plot 1
2619421Smckusickfilters.
27*43693Scael.Pp
2819421SmckusickIf the coordinates of a point are followed by
2919421Smckusicka nonnumeric string, that string is printed as a
3019421Smckusicklabel beginning on the point.
3119421SmckusickLabels may be surrounded with quotes "...", in
3219421Smckusickwhich case they may be empty or contain blanks
3319421Smckusickand numbers;
3419421Smckusicklabels never contain newlines.
35*43693Scael.Pp
3619421SmckusickThe following options are recognized,
3719421Smckusickeach as a separate argument.
38*43693Scael.Tw Fl
39*43693Scael.Tp Fl a
4019421SmckusickSupply abscissas automatically (they are missing from
4119421Smckusickthe input); spacing is given by the next
4219421Smckusickargument (default 1).
4319421SmckusickA second optional argument is the starting point for
4419421Smckusickautomatic abscissas (default 0 or lower limit given by
45*43693Scael.Fl x  ) .
46*43693Scael.Tp Fl b
4719421SmckusickBreak (disconnect) the graph after each label in the input.
48*43693Scael.Tp Fl c
4919421SmckusickCharacter string given by next argument
5019421Smckusickis default label for each point.
51*43693Scael.Tp Fl g
5219421SmckusickNext argument is grid style,
5319421Smckusick0 no grid, 1 frame with ticks, 2 full grid (default).
54*43693Scael.Tp Fl l
5519421SmckusickNext argument is label for graph.
56*43693Scael.Tp Fl m
5719421SmckusickNext argument is mode (style)
5819421Smckusickof connecting lines:
5919421Smckusick0 disconnected, 1 connected (default).
6019421SmckusickSome devices give distinguishable line styles
6119421Smckusickfor other small integers.
62*43693Scael.Tp Fl s
6319421SmckusickSave screen, don't erase before plotting.
64*43693Scael.Tc Fl x
65*43693Scael.Ws
66*43693Scael.Op Ar l
67*43693Scael.Cx
6819421SmckusickIf
69*43693Scael.Ar l
7019421Smckusickis present, x axis is logarithmic.
7119421SmckusickNext 1 (or 2) arguments are lower (and upper)
72*43693Scael.Ar x
7319421Smckusicklimits.
74*43693ScaelThird argument, if present, is grid spacing on
75*43693Scael.Ar x
7619421Smckusickaxis.
7719421SmckusickNormally these quantities are determined automatically.
78*43693Scael.Tc Fl y
79*43693Scael.Ws
80*43693Scael.Op Ar l
81*43693Scael.Cx
8219421SmckusickSimilarly for
83*43693Scael.Ar y  .
84*43693Scael.Tp Fl h
8519421SmckusickNext argument is fraction of space for height.
86*43693Scael.Tp Fl w
8719421SmckusickSimilarly for width.
88*43693Scael.Tp Fl r
8919421SmckusickNext argument is fraction of space to move right before plotting.
90*43693Scael.Tp Fl u
9119421SmckusickSimilarly to move up before plotting.
92*43693Scael.Tp Fl t
9319421SmckusickTranspose horizontal and vertical axes.
9419421Smckusick(Option
95*43693Scael.Fl x
9619421Smckusicknow applies to the vertical axis.)
97*43693Scael.Tp
98*43693Scael.Pp
9919421SmckusickA legend indicating grid range is produced
10019421Smckusickwith a grid unless the
101*43693Scael.Fl s
10219421Smckusickoption is present.
103*43693Scael.Pp
10419421SmckusickIf a specified lower limit exceeds the upper limit,
10519421Smckusickthe axis
10619421Smckusickis reversed.
107*43693Scael.Sh SEE ALSO
108*43693Scael.Xr spline 1 ,
109*43693Scael.Xr plot 1
110*43693Scael.Sh HISTORY
111*43693Scael.Nm Plot
112*43693Scaelappeared in Version 6 AT&T Unix.
113*43693Scael.Sh BUGS
114*43693Scael.Nm Graph
11519421Smckusickstores all points internally and drops those for which
11619421Smckusickthere isn't room.
117*43693Scael.Pp
11819421SmckusickSegments that run out of bounds are dropped, not windowed.
119*43693Scael.Pp
12019421SmckusickLogarithmic axes may not be reversed.
121