Previous: Data Formats, Up: graph


2.6 graph command-line options

The graph program reads one or more datasets from files named on the command line or from standard input, and prepares a plot. The output format is specified with the ‘-T’ option.

By default, graph reads ASCII data from the files specified on the command line. The data are pairs of numbers, interpreted as the x and y coordinates of data points. If no files are specified, or the file name ‘- is specified, the standard input is read. An output file is written to standard output, unless the ‘-T X’ option is specified. In that case the graph is displayed in a popped-up window on an X Window System display, and there is no output file.

There are many command-line options for adjusting the visual appearance of the plot. The relative order of file names and command-line options is important. Only the options that precede a file name on the command line take effect for that file.

The following sections list the possible options. Each option that takes an argument is followed, in parentheses, by the type and default value of the argument. There are five sorts of option.

The behavior of graph is also affected by a number of environment variables, so there is a section discussing them as well.