GRAPH(1G) BSD GRAPH(1G)
NAME
graph - draw a graph
SYNOPSIS
graph [ option ] ...
DESCRIPTION
The graph command with no options takes pairs of numbers from the
standard input as abscissas and ordinates of a graph. Successive points
are connected by straight lines. The graph is encoded on the standard
output for display by the plot(1G) filters.
If the coordinates of a point are followed by a nonnumeric string, that
string is printed as a label beginning on the point. You can enclose
labels in quotation marks "..."; if you do, the labels can be empty or
contain blanks and numbers; labels never contain newlines.
OPTIONS
graph recognizes the following options, each as a separate argument.
-a Supply abscissas automatically (they are missing from the
input); spacing is given by the next argument (the default is
1). A second optional argument is the starting point for
automatic abscissas (the default is 0 or a lower limit given by
the -x option).
-b Break (disconnect) the graph after each label in the input.
-c string The character string given by string is the default label for
each point.
-g style Use the grid style, style: 0 for no grid, 1 for frame with
ticks, 2 for full grid (2 is the default).
-l label Use the string label as the label for the graph.
-m mode Use mode as the mode (style) of connecting lines: 0 for
disconnected, 1 for connected (1 is the default). Some devices
give distinguishable line styles for other small integers.
-s Save screen, don't erase before plotting.
-x [[[ l ] u ] s ]
If l is present, the x axis is logarithmic. The next one (or
two) arguments are the lower (and upper) x limits. The third
argument, if present, is the grid spacing on the x axis.
Normally these quantities are determined automatically.
-y [[[ l ] u ] s ]
If l is present, the y axis is logarithmic. The next one (or
two) arguments are the lower (and upper) y limits. The third
argument, if present, is the grid spacing on the y axis.
Normally these quantities are determined automatically.
-h n Use n as the fraction of space for height.
-w n Use n as the fraction of space for width.
-r n Use n as the fraction of space to move to the right, before
plotting.
-u n Use n as the fraction of space to move up before plotting.
-t Transpose the horizontal and vertical axes. (that is, option
-x now applies to the vertical axis.)
graph produces a legend indicating the grid range with a grid, unless the
-s option is present.
If a specified lower limit exceeds the upper limit, the axis is reversed.
BUGS
graph stores all points internally and drops those for which there isn't
room.
Segments that run out of bounds are dropped, not windowed.
Logarithmic axes may not be reversed.
SEE ALSO
spline(1G), plot(1G)