grap
Graph language preprocessor for groff documents
TLDR
SYNOPSIS
grap [options] [file]
DESCRIPTION
grap is a preprocessor for creating graphs within groff/troff documents. Input is written in a simple declarative language enclosed between .G1 and .G2 macros, and the output is pic(1) code suitable for further processing by pic and troff/groff.The tool creates publication-quality graphs for technical documents, supporting features like labeled axes, multiple data sets, logarithmic scales, and coordinate systems. It integrates seamlessly with the troff document processing pipeline.
PARAMETERS
FILE
Grap input file. If omitted, reads from standard input.-d VAR=VALUE
Define a variable and its value before processing.-l
Use the graph's default line thickness.-R
Do not load the default macro startup file.--help
Display help information.
CAVEATS
Part of the groff ecosystem. Outputs pic format that must be further processed by pic(1) and troff/groff. Not installed by default on most distributions; often available as a separate package.
HISTORY
grap was developed at Bell Labs as part of the Unix document preparation tools, described by Kernighan and Bentley.
