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