From 82ba854bed25dc95a93aec9bdbc5e97f7badf080 Mon Sep 17 00:00:00 2001 From: Daniel Birket Date: Wed, 1 Sep 2021 12:56:46 -0400 Subject: [PATCH] graphviz filter commands: add pages (#6401) --- pages/common/acyclic.md | 17 +++++++++++++++++ pages/common/bcomps.md | 21 +++++++++++++++++++++ pages/common/ccomps.md | 21 +++++++++++++++++++++ pages/common/edgepaint.md | 21 +++++++++++++++++++++ pages/common/gvcolor.md | 17 +++++++++++++++++ pages/common/gvpack.md | 25 +++++++++++++++++++++++++ pages/common/mingle.md | 17 +++++++++++++++++ pages/common/nop.md | 17 +++++++++++++++++ pages/common/sccmap.md | 17 +++++++++++++++++ pages/common/tred.md | 13 +++++++++++++ pages/common/unflatten.md | 17 +++++++++++++++++ 11 files changed, 203 insertions(+) create mode 100644 pages/common/acyclic.md create mode 100644 pages/common/bcomps.md create mode 100644 pages/common/ccomps.md create mode 100644 pages/common/edgepaint.md create mode 100644 pages/common/gvcolor.md create mode 100644 pages/common/gvpack.md create mode 100644 pages/common/mingle.md create mode 100644 pages/common/nop.md create mode 100644 pages/common/sccmap.md create mode 100644 pages/common/tred.md create mode 100644 pages/common/unflatten.md diff --git a/pages/common/acyclic.md b/pages/common/acyclic.md new file mode 100644 index 000000000..6d3c8a431 --- /dev/null +++ b/pages/common/acyclic.md @@ -0,0 +1,17 @@ +# acyclic + +> Make a directed graph acyclic by reversing some edges. +> Graphviz filters: `acyclic`, `bcomps`, `comps`, `edgepaint`, `gvcolor`, `gvpack`, `mingle`, `nop`, `sccmap`, `tred`, & `unflatten`. +> More information: . + +- Make a directed graph acyclic by reversing some edges: + +`acyclic {{path/to/input.gv}} > {{path/to/output.gv}}` + +- Print if a graph is acyclic, has a cycle, or is undirected, producing no output graph: + +`acyclic -v -n {{path/to/input.gv}}` + +- Display help for `acyclic`: + +`acyclic -?` diff --git a/pages/common/bcomps.md b/pages/common/bcomps.md new file mode 100644 index 000000000..32e604bb6 --- /dev/null +++ b/pages/common/bcomps.md @@ -0,0 +1,21 @@ +# bcomps + +> Decompose graphs into their biconnected components. +> Graphviz filters: `acyclic`, `bcomps`, `comps`, `edgepaint`, `gvcolor`, `gvpack`, `mingle`, `nop`, `sccmap`, `tred`, & `unflatten`. +> More information: . + +- Decompose one or more graphs into their biconnected components: + +`bcomps {{path/to/input1.gv}} {{path/to/input2.gv ...}} > {{path/to/output.gv}}` + +- Print the number of blocks and cutvertices in one or more graphs: + +`bcomps -v -s {{path/to/input1.gv}} {{path/to/input2.gv ...}}` + +- Write each block and block-cutvertex tree to multiple numbered filenames based on `output.gv`: + +`bcomps -x -o {{path/to/output.gv}} {{path/to/input1.gv}} {{path/to/input2.gv ...}}` + +- Display help for `bcomps`: + +`bcomps -?` diff --git a/pages/common/ccomps.md b/pages/common/ccomps.md new file mode 100644 index 000000000..dc3f56663 --- /dev/null +++ b/pages/common/ccomps.md @@ -0,0 +1,21 @@ +# ccomps + +> Decompose graphs into their connected components. +> Graphviz filters: `acyclic`, `bcomps`, `comps`, `edgepaint`, `gvcolor`, `gvpack`, `mingle`, `nop`, `sccmap`, `tred`, & `unflatten`. +> More information: . + +- Decompose one or more graphs into their connected components: + +`ccomps {{path/to/input1.gv}} {{path/to/input2.gv ...}} > {{path/to/output.gv}}` + +- Print the number of nodes, edges, and connected components in one or more graphs: + +`ccomps -v -s {{path/to/input1.gv}} {{path/to/input2.gv ...}}` + +- Write each connected component to numbered filenames based on `output.gv`: + +`ccomps -x -o {{path/to/output.gv}} {{path/to/input1.gv}} {{path/to/input2.gv ...}}` + +- Display help for `ccomps`: + +`ccomps -?` diff --git a/pages/common/edgepaint.md b/pages/common/edgepaint.md new file mode 100644 index 000000000..071443d31 --- /dev/null +++ b/pages/common/edgepaint.md @@ -0,0 +1,21 @@ +# edgepaint + +> Colorize edges of a graph layout to clarify crossing edges. +> Graphviz filters: `acyclic`, `bcomps`, `comps`, `edgepaint`, `gvcolor`, `gvpack`, `mingle`, `nop`, `sccmap`, `tred`, & `unflatten`. +> More information: . + +- Colorize edges of one or more graph layouts (that already have layout information) to clarify crossing edges: + +`edgepaint {{path/to/layout1.gv}} {{path/to/layout2.gv ...}} > {{path/to/output.gv}}` + +- Colorize edges using a color scheme. (See ): + +`edgepaint -color-scheme={{accent7}} {{path/to/layout.gv}} > {{path/to/output.gv}}` + +- Lay out a graph and colorize its edges, then convert to a PNG image: + +`dot {{path/to/input.gv}} | edgepaint | dot -T {{png}} > {{path/to/output.png}}` + +- Display help for `edgepaint`: + +`edgepaint -?` diff --git a/pages/common/gvcolor.md b/pages/common/gvcolor.md new file mode 100644 index 000000000..88ebbe8ff --- /dev/null +++ b/pages/common/gvcolor.md @@ -0,0 +1,17 @@ +# gvcolor + +> Colorize a ranked digraph with a range of colors. +> Graphviz filters: `acyclic`, `bcomps`, `comps`, `edgepaint`, `gvcolor`, `gvpack`, `mingle`, `nop`, `sccmap`, `tred`, & `unflatten`. +> More information: . + +- Colorize one or more ranked digraph (that were already processed by `dot`): + +`gvcolor {{path/to/layout1.gv}} {{path/to/layout2.gv ...}} > {{path/to/output.gv}}` + +- Lay out a graph and colorize it, then convert to a PNG image: + +`dot {{path/to/input.gv}} | gvcolor | dot -T {{png}} > {{path/to/output.png}}` + +- Display help for `gvcolor`: + +`gvcolor -?` diff --git a/pages/common/gvpack.md b/pages/common/gvpack.md new file mode 100644 index 000000000..feab79aba --- /dev/null +++ b/pages/common/gvpack.md @@ -0,0 +1,25 @@ +# gvpack + +> Combine several graph layouts (that already have layout information). +> Graphviz filters: `acyclic`, `bcomps`, `comps`, `edgepaint`, `gvcolor`, `gvpack`, `mingle`, `nop`, `sccmap`, `tred`, & `unflatten`. +> More information: . + +- Combine several graph layouts (that already have layout information): + +`gvpack {{path/to/layout1.gv}} {{path/to/layout2.gv ...}} > {{path/to/output.gv}}` + +- Combine several graph layouts at the graph level, keeping graphs separate: + +`gvpack -g {{path/to/layout1.gv}} {{path/to/layout2.gv ...}} > {{path/to/output.gv}}` + +- Combine several graph layouts at the node level, ignoring clusters: + +`gvpack -n {{path/to/layout1.gv}} {{path/to/layout2.gv ...}} > {{path/to/output.gv}}` + +- Combine several graph layouts without packing: + +`gvpack -u {{path/to/layout1.gv}} {{path/to/layout2.gv ...}} > {{path/to/output.gv}}` + +- Display help for `gvpack`: + +`gvpack -?` diff --git a/pages/common/mingle.md b/pages/common/mingle.md new file mode 100644 index 000000000..78edad325 --- /dev/null +++ b/pages/common/mingle.md @@ -0,0 +1,17 @@ +# mingle + +> Bundle the edges of a graph layout. +> Graphviz filters: `acyclic`, `bcomps`, `comps`, `edgepaint`, `gvcolor`, `gvpack`, `mingle`, `nop`, `sccmap`, `tred`, & `unflatten`. +> More information: . + +- Bundle the edges of one or more graph layouts (that already have layout information): + +`mingle {{path/to/layout1.gv}} {{path/to/layout2.gv ...}} > {{path/to/output.gv}}` + +- Perform layout, bundling, and output to a picture with one command: + +`dot {{path/to/input.gv}} | mingle | dot -T {{png}} > {{path/to/output.png}}` + +- Display help for `mingle`: + +`mingle -?` diff --git a/pages/common/nop.md b/pages/common/nop.md new file mode 100644 index 000000000..d9f19920f --- /dev/null +++ b/pages/common/nop.md @@ -0,0 +1,17 @@ +# nop + +> Check validity and pretty-print graphs in canonical format. +> Graphviz filters: `acyclic`, `bcomps`, `comps`, `edgepaint`, `gvcolor`, `gvpack`, `mingle`, `nop`, `sccmap`, `tred`, & `unflatten`. +> More information: . + +- Pretty-print one or more graphs in canonical format: + +`nop {{path/to/input1.gv}} {{path/to/input2.gv ...}} > {{path/to/output.gv}}` + +- Check one or more graphs for validity, producing no output graph: + +`nop -p {{path/to/input1.gv}} {{path/to/input2.gv ...}}` + +- Display help for `nop`: + +`nop -?` diff --git a/pages/common/sccmap.md b/pages/common/sccmap.md new file mode 100644 index 000000000..ec8d96556 --- /dev/null +++ b/pages/common/sccmap.md @@ -0,0 +1,17 @@ +# sccmap + +> Extract strongly connected components of directed graphs. +> Graphviz filters: `acyclic`, `bcomps`, `comps`, `edgepaint`, `gvcolor`, `gvpack`, `mingle`, `nop`, `sccmap`, `tred`, & `unflatten`. +> More information: . + +- Extract strongly connected components of one or more directed graphs: + +`sccmap -S {{path/to/input1.gv}} {{path/to/input2.gv ...}} > {{path/to/output.gv}}` + +- Print statistics about a graph, producing no output graph: + +`sccmap -v -s {{path/to/input1.gv}} {{path/to/input2.gv ...}}` + +- Display help for `sccmap`: + +`sccmap -?` diff --git a/pages/common/tred.md b/pages/common/tred.md new file mode 100644 index 000000000..b1248b733 --- /dev/null +++ b/pages/common/tred.md @@ -0,0 +1,13 @@ +# tred + +> Compute the transitive reduction of directed graphs. +> Graphviz filters: `acyclic`, `bcomps`, `comps`, `edgepaint`, `gvcolor`, `gvpack`, `mingle`, `nop`, `sccmap`, `tred`, & `unflatten`. +> More information: . + +- Construct the transitive reduction graph of one or more directed graphs: + +`tred {{path/to/input1.gv}} {{path/to/input2.gv ...}} > {{path/to/output.gv}}` + +- Display help: + +`tred -?` diff --git a/pages/common/unflatten.md b/pages/common/unflatten.md new file mode 100644 index 000000000..aea20ba77 --- /dev/null +++ b/pages/common/unflatten.md @@ -0,0 +1,17 @@ +# unflatten + +> Adjust directed graphs to improve the layout aspect ratio. +> Graphviz filters: `acyclic`, `bcomps`, `comps`, `edgepaint`, `gvcolor`, `gvpack`, `mingle`, `nop`, `sccmap`, `tred`, & `unflatten`. +> More information: . + +- Adjust one or more directed graphs to improve the layout aspect ratio: + +`unflatten {{path/to/input1.gv}} {{path/to/input2.gv ...}} > {{path/to/output.gv}}` + +- Use `unflatten` as a preprocessor for `dot` layout to improve aspect ratio: + +`unflatten {{path/to/input.gv}} | dot -T {{png}} {{path/to/output.png}}` + +- Display help for `unflatten`: + +`unflatten -?`