Linux command
edgepaint 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Color edges
edgepaint [graph.dot] -o [colored.dot]
Set the minimum
edgepaint --angle=15 [graph.dot] -o [out.dot]
Use a specific
edgepaint --color_scheme=accent8 [graph.dot] -o [out.dot]
Allow edges sharing an endpoint
edgepaint --share_endpoint [graph.dot] -o [out.dot]
Pipe through dot
dot graph.dot | edgepaint | dot -Tpng -o out.png
说明
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.
参数
- -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.
FAQ
What is the edgepaint command used for?
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.
How do I run a basic edgepaint example?
Run `edgepaint [graph.dot] -o [colored.dot]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -o _FILE_ do in edgepaint?
Write output to FILE instead of stdout.