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