edgepaint
color edges of a laid-out graph for visual distinction
TLDR
SYNOPSIS
edgepaint [options] [input] [-o output]
DESCRIPTION
edgepaint assigns colors to the edges of a graph so that adjacent or near-parallel edges receive maximally distinct colors. It expects a graph that has already been laid out (for example by dot or neato), since the algorithm uses the geometric positions of edges to decide which pairs should differ.Colors are written into each edge's `color` attribute and the modified DOT is emitted on stdout (or to the file given with -o). The default `lab` color scheme produces perceptually distinct hues; alternative Brewer schemes give a fixed small palette.
PARAMETERS
input
Input DOT file with node positions already laid out. Reads stdin if omitted.-o FILE
Write output to FILE instead of stdout.--accuracy=e
Precision for finding maximally different coloring at each node. Default 0.01.--angle=a
Color two edges differently if their incidence angle is less than a degrees. Default 15.--color_scheme=c
Color palette: `rgb`, `gray`, `lab` (default), a list of hex colors, or any Brewer scheme name (e.g. `accent8`, `set19`).--lightness=l1,l2
Lightness range, only with `lab`. Integers 0-100. Default `0,70`.--random_seed=s
Seed for the randomized coloring. Negative values run multiple iterations with different seeds.--share_endpoint
Edges that share a node and are nearly anti-parallel (~180 degrees apart) are not treated as conflicting.-v
Verbose output.-?
Print usage and exit.
CAVEATS
Input must already contain edge geometry from a layout engine; otherwise edgepaint cannot determine angles. Very dense graphs may exhaust the palette and still produce visually similar edges. The Brewer schemes have a fixed number of colors, so large graphs should prefer `lab`.
HISTORY
edgepaint is part of Graphviz, originally developed at AT&T Labs Research. It implements ideas from Yifan Hu's work on edge coloring for graph readability.
