Diagrams that explain¶
Choose a diagram for a question. A flow chart explains a choice. A block diagram explains responsibility. A sequence explains ordering. A graph explains relationships. Use prose when it answers the question more directly.
A flow chart¶
The drawing names the owner at the growth step. It does not suggest that the conversion core allocates. This distinction is part of the contract.
Light, dark and print¶
A transparent canvas does not change a graph’s ink. Dark text can disappear on a dark page. Ordinary graphs therefore keep their chosen colors and receive a light panel in the default dark theme.
For the manual’s adaptive palette, add :class: graphviz-adaptive to the
directive. This is available in Guidedog 0.6.3 and later. Guidedog adds a fixed
stylesheet inside the SVG image. Its dark media query follows the embedding
page’s color-scheme, including the theme control’s explicit selection.
No script, external stylesheet or inline page SVG is needed.
Use short labels, rounded boxes for steps, notes for input and cylinders for durable stores. Node classes distinguish roles in the dark palette:
| DOT class | Role |
|---|---|
gd-input |
Source, configuration or supporting material; warm neutral. |
gd-output |
A produced artifact; blue. |
gd-plugin |
An optional extension point; amber, with a dashed border. |
gd-choice |
A decision; amber, with a diamond shape. |
gd-memory |
A separate native allocation boundary; violet. |
For example, source [class="gd-input", shape=note, fillcolor="#fbfaf3"]
sets both the light presentation and its dark role. Classes do not choose shapes
or add labels: write those explicitly so the drawing also works in monochrome.
Unclassified steps use green. This palette is opt-in; do not apply it to artwork
whose exact colors carry data.
The light DOT attributes remain the PDF master. The book receives an SVG without the adaptive stylesheet. Printed HTML selects the light scheme too. Keep both palettes legible and test the actual book; transparency alone proves neither. The inheritance rule is defined by the CSS color-scheme specification.
Make the result legible¶
Keep node labels short. Explain a longer rule below the drawing. Prefer one direction for the main path. Label a return edge with its condition. Use shape and text as well as color. A print reader may have no color at all.
Supply alternative text and a caption. Test narrow browser windows and the PDF page. If a diagram needs tiny type to fit, split it into two drawings. See Images, video, audio, and downloads for image and figure sizing.
On narrow screens, captioned diagrams scroll horizontally to keep labels readable. Scroll inside the figure; the page itself keeps its width.