No matching examples. Try another query or clear the filters.
A visual reference · grap
grap, one change at a time
Complete source. One deliberate change. Its actual result.
Follow measurements from a small field archive through counts, trends and scientific comparisons. Data coordinates and physical page dimensions have different jobs; each example makes that distinction visible.
The Org file is canonical. Read the searchable HTML beside your editor or use the PDF offline. All measurements and operational quantities are synthetic teaching fixtures.
Last changes: 2026-11-16. Original examples, pinned native rendering and portable source/configuration downloads.
Each example is a complete file. Identify the syntax introduced before changing it.
Inspect the output
Open a gallery thumbnail, compare the native figure and follow a sibling example.
Make a change
Download the source/configuration ZIP, make the suggested edit and repeat its exact command.
Browse this tour with the gallery, search and topic filters. Stable IDs identify chapters and examples; Back to diagram overview returns to the corresponding thumbnail. The shared configuration sets appearance, never example data.
Reproduce the diagrams
The reviewed native toolchain is GNU pic and groff 1.25.0, grap 1.49, pdfcrop 1.42, Ghostscript 10.08.0 and Poppler 26.11.0. Exact checksums and publisher versions are recorded in VERSIONS.json. Install GNU groff, Ghostscript, Poppler and TeX Live with pdfcrop. Install grap 1.49 as well. The driver checks the native versions and the bundled Nimbus Sans font programs. Native PDF is produced by groff with all used fonts embedded, then cropped by pdfcrop; Poppler creates the SVG and PNG companions.
Install the shared publisher with make setup in its sibling directory. Activate that Python environment before using a standalone bundle, or install its pinned requirements.txt in a fresh environment. The published HTML embeds figures and works offline; keep the companion directories for individual downloads.
make full
make check
tools/render --version
tools/render examples/GRA-01-001.grap
Command or configuration
Meaning in this tour
tools/render SOURCE
Run the pinned native pipeline and write PDF, SVG and PNG.
config/render.json
Reviewed tool versions and bundled font checksums.
SOURCE_DATE_EPOCH=0
Fix native build-date inputs; the driver removes PDF date metadata.
make full
Explicitly execute reviewed programs, then build HTML and PDF.
make
Reuse verified local results; never execute examples implicitly.
make check
Verify output hashes, example IDs and offline links.
pic -S
Expand the complete drawing with native safe mode.
groff -Tpdf -P-e -P-W -P-pa3
Embed all used fonts, make warnings fatal and use a generous A3 working canvas.
pdfcrop --hires --margins 10
Trim the native PDF and preserve a ten-point margin.
pdftocairo -svg
Convert the native PDF to its self-contained SVG companion.
pdftocairo -png -singlefile -r 120
Produce the downloadable PNG at a fixed resolution.
grap -d config/grap.defines
Read the bundled standard macro definitions before pic.
The grap 1.49 version query returns exit status 5 while printing its banner. The driver checks that banner; every actual example render must return zero.
Download the complete reproduction bundle to run all examples, or inspect the shared render configuration. After installing system tools and the shared Python dependencies, preparation and rendering use no network. SVG is self-contained vector artwork; native PDF pages are placed directly in the guide. Repair sources rather than editing generated figures.
01 · First graphs
Separate the physical frame from the data values plotted inside it.
.so config/render.roff
.G1
frame ht 2.1 wid 3.6
coord x 0,6 y 0,20
label bottom "Day"
label left "Temperature (C)" left .35
circle at 2,12 radius .04
.G2
Parameter
Meaning in this example
label
Attach explanatory text to a side of the frame.
Render this diagram
tools/renderexamples/GRA-01-004.grap
Try changing: Change Temperature (C) to Count.
Actual output
GRA-01-004 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-01-004: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
A logarithmic value scale can reveal multiplicative growth. Keep zero out of the domain and state that equal vertical distances represent equal ratios.
.so config/render.roff
.G1
frame ht 2.1 wid 3.6
coord x 0,6 y 0,20
label left "Temperature (C)" left .35
next at 1,(50-32)*5/9
next at 3,(59-32)*5/9
next at 5,(68-32)*5/9
.G2
Parameter
Meaning in this example
(F-32)*5/9
Convert each supplied Fahrenheit reading to Celsius.
Render this diagram
tools/renderexamples/GRA-02-006.grap
Try changing: Add a Fahrenheit value of 77 at day 6.
Actual output
GRA-02-006 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-02-006: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
.so config/render.roff
.G1
frame ht 2.1 wid 3.6
coord x 0,6 y 0,20
draw North solid
draw South dashed
next North at 1,8
next South at 1,13
next North at 5,14
next South at 5,10
.G2
Parameter
Meaning in this example
draw NAME
Define an independent sequence of connected points.
Render this diagram
tools/renderexamples/GRA-04-001.grap
Try changing: Change the South endpoint to 16.
Actual output
GRA-04-001 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-04-001: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
A dashed line distinguishes a supplied reference from ordinary observations. Use it for a target profile rather than another unlabeled measurement stream.
.so config/render.roff
.G1
frame ht 2.1 wid 3.6
coord x 0,6 y 0,5
label left "Square root of count" left .4
for d from 1 to 5 do { circle at d,sqrt(d*4) radius .035; }
.G2
Parameter
Meaning in this example
sqrt
Transform the supplied count before placing the point.
Render this diagram
tools/renderexamples/GRA-05-005.grap
Try changing: Replace the square root with the raw d*4 count and change the axis range.
Actual output
GRA-05-005 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-05-005: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
Print records a calculated value in the native diagnostics. Use it while checking a transformation, with the same expression supplying the visible point.
.so config/render.roff
.G1
frame ht 2.1 wid 3.6
coord x 0,20 y 0,4
ticks left at 1 "A",2 "B",3 "C"
bar right 1 ht 8 wid .6
bar right 2 ht 14 wid .6
bar right 3 ht 11 wid .6
.G2
Parameter
Meaning in this example
bar right
Extend a bar horizontally from zero.
Render this diagram
tools/renderexamples/GRA-06-002.grap
Try changing: Rename the categories to field station names.
Actual output
GRA-06-002 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-06-002: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
.so config/render.roff
.G1
frame ht 2.1 wid 3.6
coord x 0,6 y 0,20
bar up 2 ht 8 wid .8 fillcolor "wash"
bar up 2 ht 4 base 8 wid .8 fillcolor "blue"
.G2
Parameter
Meaning in this example
base 8
Start the second bar at the first component's top.
Render this diagram
tools/renderexamples/GRA-06-003.grap
Try changing: Change the second component to 6.
Actual output
GRA-06-003 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-06-003: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
A histogram can use explicitly supplied bins and counts. Keep the widths identical and state that grap is drawing a prepared distribution rather than estimating bins.
.so config/render.roff
.G1
frame ht 2.1 wid 3.6
coord x 0,6 y 0,20
bar up 1.8 ht 8 wid .35 fillcolor "wash"
bar up 2.2 ht 11 wid .35 fillcolor "blue"
bar up 3.8 ht 14 wid .35 fillcolor "wash"
bar up 4.2 ht 12 wid .35 fillcolor "blue"
.G2
Parameter
Meaning in this example
Offset category positions
Place paired bars beside the same category center.
Render this diagram
tools/renderexamples/GRA-06-005.grap
Try changing: Swap the fill colors of the two series.
Actual output
GRA-06-005 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-06-005: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
A box, median and whiskers can display supplied five-number statistics. Here whiskers are the stated minimum and maximum; grap applies no automatic outlier rule.
.so config/render.roff
.G1
frame ht 2.1 wid 3.6
coord x 0,6 y 0,20
line from 3,2 to 3,16
bar 2.6,5,3.4,12 fillcolor "wash"
line from 2.6,9 to 3.4,9
line from 2.8,2 to 3.2,2
line from 2.8,16 to 3.2,16
.G2
Parameter
Meaning in this example
bar corner,corner
Draw the interquartile box from two corners.
Separate median line
Draw the supplied median rather than recomputing it.
Render this diagram
tools/renderexamples/GRA-06-006.grap
Try changing: Change the median from 9 to 10.
Actual output
GRA-06-006 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-06-006: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
A vertical segment and short caps display an interval around a reading. Use the parameter table to state whether the bounds are errors, confidence limits or another supplied range.
.so config/render.roff
.G1
frame ht 2.1 wid 3.6
coord x 0,6 y 0,20
line from 3,8 to 3,14
line from 2.8,8 to 3.2,8
line from 2.8,14 to 3.2,14
circle at 3,11 radius .04
.G2
Parameter
Meaning in this example
8 to 14
Use the supplied lower and upper measurement bounds.
Render this diagram
tools/renderexamples/GRA-07-001.grap
Try changing: Widen the interval to 7 through 15.
Actual output
GRA-07-001 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-07-001: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
.so config/render.roff
.G1
frame ht 2.1 wid 3.6
coord x 0,6 y 0,20
line dashed from 0,15 to 6,15
"capacity" above at 4.8,15
circle at 2,12 radius .04
.G2
Parameter
Meaning in this example
line dashed
Separate the supplied threshold from observations.
Render this diagram
tools/renderexamples/GRA-07-002.grap
Try changing: Move the capacity to 17.
Actual output
GRA-07-002 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-07-002: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
.so config/render.roff
.G1
frame ht 2.1 wid 3.6
coord x 0,6 y 0,20
circle at 2,8 radius .04
circle at 5,14 radius .04
arrow from 2.2,8.5 to 4.8,13.5
.G2
Parameter
Meaning in this example
arrow from / to
Point from one supplied comparison position to another.
Render this diagram
tools/renderexamples/GRA-07-003.grap
Try changing: Change the second reading and the arrow endpoint together.
Actual output
GRA-07-003 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-07-003: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
.so config/render.roff
.G1
frame ht 2.1 wid 3.6
coord x 0,6 y 0,20
bar 0,8,6,14 fillcolor "wash"
circle at 2,12 radius .04
circle at 4,16 radius .04
.G2
Parameter
Meaning in this example
Filled corner rectangle
Mark the supplied acceptable interval.
Render this diagram
tools/renderexamples/GRA-07-004.grap
Try changing: Change the acceptable range to 9 through 15.
Actual output
GRA-07-004 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-07-004: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
The radius must grow with the square root of count. Use physical radii so the circle area, rather than its diameter, represents the supplied sample size.
.so config/render.roff
.G1
frame ht 2.1 wid 3.6
coord x 0,6 y 0,20
circle at 1,8 radius .03*sqrt(1) fillcolor "blue"
circle at 3,12 radius .03*sqrt(4) fillcolor "blue"
circle at 5,16 radius .03*sqrt(9) fillcolor "blue"
.G2
Parameter
Meaning in this example
sqrt(count)
Make circle area proportional to the supplied count.
Render this diagram
tools/renderexamples/GRA-07-006.grap
Try changing: Change the largest count from 9 to 16.
Actual output
GRA-07-006 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-07-006: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
.so config/render.roff
.G1
frame ht 2.1 wid 3.6
coord x 0,6 y 0,20
for d from 1 to 5 do {
if d==3 then {
circle at d,10 radius .07 fillcolor "blue"
} else {
circle at d,10 radius .035
}
}
.G2
Parameter
Meaning in this example
if / then / else
Choose the highlighted marker for a supplied condition.
Render this diagram
tools/renderexamples/GRA-08-004.grap
Try changing: Select d==4 instead.
Actual output
GRA-08-004 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-08-004: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
A deterministic expression can supply a complete reference curve. Use a stated sampling interval so changing it has an observable effect on smoothness.
.so config/render.roff
.G1
graph First
frame ht 1.6 wid 2.4
coord x 0,6 y 0,20
label top "North"
circle at 2,12
graph Second with .Frame.w at First.Frame.e + (.7,0)
frame ht 1.6 wid 2.4
coord x 0,6 y 0,20
label top "South"
circle at 4,15
.G2
Parameter
Meaning in this example
graph / .Frame.w
Place the next graph relative to the previous frame.
Render this diagram
tools/renderexamples/GRA-09-001.grap
Try changing: Increase the gap between frames to 1.
Actual output
GRA-09-001 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-09-001: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
.so config/render.roff
.G1
graph First
frame ht 1.6 wid 2.4
coord x 0,6 y 0,20
circle at 2,12
graph Second with .Frame.n at First.Frame.s - (0,.7)
frame ht 1.6 wid 2.4
coord x 0,6 y 0,20
circle at 4,15
.G2
Parameter
Meaning in this example
.Frame.n / .Frame.s
Align the top of the second frame below the first.
Render this diagram
tools/renderexamples/GRA-09-003.grap
Try changing: Increase the vertical gap to 1.
Actual output
GRA-09-003 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-09-003: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
.so config/render.roff
.G1
frame ht 2.1 wid 3.6
coord x 0,6 y 0,20
circle at 2,12
pic arrow from Frame.ne + (.5,.3) to Frame.ne
pic "shared frame" at Frame.ne + (.5,.5)
.G2
Parameter
Meaning in this example
Frame.ne
Refer to the frame's physical northeast corner.
Render this diagram
tools/renderexamples/GRA-09-005.grap
Try changing: Move the callout farther to the right.
Actual output
GRA-09-005 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-09-005: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
Two panels can carry distinct but related questions. Keep units and panel headings explicit so shared alignment does not imply the same measured quantity.
.so config/render.roff
.G1
graph First
frame ht 1.6 wid 2.4
coord x 0,6 y 0,20
label top "Temperature (C)"
draw solid
1 8
3 14
5 11
graph Second with .Frame.w at First.Frame.e + (.7,0)
frame ht 1.6 wid 2.4
coord x 0,6 y 0,20
label top "Samples"
bar up 2 ht 12 wid .8
bar up 4 ht 17 wid .8
.G2
Parameter
Meaning in this example
Panel headings
State the different measured quantity in each panel.
Render this diagram
tools/renderexamples/GRA-09-006.grap
Try changing: Change the sample counts without changing temperature.
Actual output
GRA-09-006 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-09-006: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
A labeled trend keeps units and sampling positions visible. Use local input so the reported observations can be inspected independently of the drawing.
.so config/render.roff
.G1
frame ht 2.1 wid 3.6
coord x 0,6 y 0,20
label top "Light: accepted; dark: rejected"
bar up 2 ht 9 wid .8 fillcolor "wash"
bar up 2 ht 3 base 9 wid .8 fillcolor "blue"
bar up 4 ht 14 wid .8 fillcolor "wash"
bar up 4 ht 2 base 14 wid .8 fillcolor "blue"
.G2
Parameter
Meaning in this example
Stacked counts
Keep each rejected component on top of its accepted count.
Render this diagram
tools/renderexamples/GRA-10-003.grap
Try changing: Change the second rejected count to 4.
Actual output
GRA-10-003 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-10-003: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
A threshold report should make exceedances visible without discarding ordinary observations. Use an explicit limit, a named line and the complete measurement sequence.
.so config/render.roff
.G1
frame ht 2.1 wid 3.6
coord x 0,6 y 0,20
line dashed from 0,13 to 6,13
label top "Capacity: 13"
draw solid bullet
copy "data/readings.txt"
.G2
Parameter
Meaning in this example
Named threshold
Compare every supplied reading with one fixed limit.
Render this diagram
tools/renderexamples/GRA-10-004.grap
Try changing: Move the capacity to 15.
Actual output
GRA-10-004 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-10-004: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
Named streams and different line styles distinguish stations. Use a text legend so the reader does not have to infer which pattern belongs to each station.
.so config/render.roff
.G1
frame ht 2.1 wid 3.6
coord x 0,6 y 0,20
label top "Solid: North; dashed: South"
draw North solid color "blue"
draw South dashed
next North at 1,8
next North at 3,14
next North at 5,11
next South at 1,12
next South at 3,10
next South at 5,16
.G2
Parameter
Meaning in this example
Named streams + legend
Keep the two supplied station sequences independent.
Render this diagram
tools/renderexamples/GRA-10-005.grap
Try changing: Swap the station line styles.
Actual output
GRA-10-005 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-10-005: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
A paired figure can show observations beside their operational context. Use separate panel captions and preserve the common day domain while naming the different quantities.
.so config/render.roff
.G1
graph First
frame ht 1.6 wid 2.4
coord x 0,6 y 0,20
label top "Observed trend"
draw solid bullet
copy "data/readings.txt"
graph Second with .Frame.w at First.Frame.e + (.7,0)
frame ht 1.6 wid 2.4
coord x 0,6 y 0,20
label top "Intake counts"
bar up 1 ht 8 wid .8 fillcolor "wash"
bar up 3 ht 14 wid .8 fillcolor "wash"
bar up 5 ht 11 wid .8 fillcolor "wash"
.G2
Parameter
Meaning in this example
Paired report
Combine two established chart types with explicit panel meanings.
Render this diagram
tools/renderexamples/GRA-10-006.grap
Try changing: Change the second panel to accepted counts.
Actual output
GRA-10-006 · grap native output
grap · exit 0
Native compiler log
Standard output
GRA-10-006: native PDF, SVG and PNG rendered with GNU pic / groff 1.25.0; grap 1.49
Start with the question and the relationship to communicate. Use the smallest example that contains the needed idea, then add labels, grouping and styling only where they clarify it. Inspect the native figure at its intended reading size. The examples draw supplied process meanings and statistics; a drawing does not execute a workflow or establish a causal claim.
Original prose, programs and synthetic datasets are CC0. Copyrightable structure and the publishing framework are CC BY 4.0, Lukas C. Bossert. Bundled fonts, package sources and other third-party material retain their own terms; consult the license scope and LICENSES/. The shared example and command index links every rendered program below.