From 31fa8a04e6bb2bcf654323ba791e9be3de2229b9 Mon Sep 17 00:00:00 2001 From: Daniel Birket Date: Mon, 2 Aug 2021 13:12:07 -0400 Subject: [PATCH] circo, fdp, neato, osage, patchwork, sfdp, twopi: add page (#6284) * dot: prepare to add all graphviz layout engines These changes are in preparation for adding commands: `neato`, `circo`, `twopi`, `pfd`, `spfd`, `osage` and `patchwork`, which use the same command syntax. This one is to argue over before posting the other seven that are generated from the same template. Changes: - use `gv` extension, not `dot`. Author uses `gv`. - link to command usage guide page - specify the type of layout in the description (varies) - use `input` and `image` not `file` or `out_file` - provide a list of available image formats - show how to use the engine as a filter - give the help command * dot: add link angle-brackets * Added a static list of layout engines as line 2 of description. * dot: Accept suggestion to highlight graph type with back-quotes. * Fix back-quotes around `png`. * circo, fdp, neato, osage, patchwork, sfdp, twopi : add pages See #6270, #2580. This pull-request contains the other seven graphviz layout commands in addition to `dot`, which is awaiting approval at #6270. These files are generated from the same template as `dot.md` there. The eight commands differ in the command name, description line and the content of the `echo` command in one example. (If any more changes are required, I will regenerate all the files together.) * gv layouts: space after flags. -o versus -O. 80 char 2nd line. * dot: remove back-quotes from stdin, stdout to match tldr usage. * graphviz layouts : use https not http. * graphviz layouts : use {{png}} {{svg}} and {{gif}} as requested. --- pages/common/circo.md | 25 +++++++++++++++++++++++++ pages/common/dot.md | 25 +++++++++++++++++++------ pages/common/fdp.md | 25 +++++++++++++++++++++++++ pages/common/neato.md | 25 +++++++++++++++++++++++++ pages/common/osage.md | 25 +++++++++++++++++++++++++ pages/common/patchwork.md | 25 +++++++++++++++++++++++++ pages/common/sfdp.md | 25 +++++++++++++++++++++++++ pages/common/twopi.md | 25 +++++++++++++++++++++++++ 8 files changed, 194 insertions(+), 6 deletions(-) create mode 100644 pages/common/circo.md create mode 100644 pages/common/fdp.md create mode 100644 pages/common/neato.md create mode 100644 pages/common/osage.md create mode 100644 pages/common/patchwork.md create mode 100644 pages/common/sfdp.md create mode 100644 pages/common/twopi.md diff --git a/pages/common/circo.md b/pages/common/circo.md new file mode 100644 index 000000000..a7bf8ad71 --- /dev/null +++ b/pages/common/circo.md @@ -0,0 +1,25 @@ +# circo + +> Render an image of a `circular` network graph from a `graphviz` file. +> Layouts: `dot`, `neato`, `twopi`, `circo`, `fdp`, `sfdp`, `osage` & `patchwork`. +> More information: . + +- Render a `png` image with a filename based on the input filename and output format (uppercase -O): + +`circo -T {{png}} -O {{path/to/input.gv}}` + +- Render a `svg` image with the specified output filename (lowercase -o): + +`circo -T {{svg}} -o {{path/to/image.svg}} {{path/to/input.gv}}` + +- Render the output in `ps`, `pdf`, `svg`, `fig`, `png`, `gif`, `jpg`, `json`, or `dot` format: + +`circo -T {{format}} -O {{path/to/input.gv}}` + +- Render a `gif` image using stdin and stdout: + +`echo "{{digraph {this -> that} }}" | circo -T {{gif}} > {{path/to/image.gif}}` + +- Display help: + +`circo -?` diff --git a/pages/common/dot.md b/pages/common/dot.md index a43accbab..8f820e488 100644 --- a/pages/common/dot.md +++ b/pages/common/dot.md @@ -1,12 +1,25 @@ # dot -> A command-line tool to produce layered drawings of directed graphs. -> More information: . +> Render an image of a `linear directed` network graph from a `graphviz` file. +> Layouts: `dot`, `neato`, `twopi`, `circo`, `fdp`, `sfdp`, `osage` & `patchwork`. +> More information: . -- Render an image file and determine output filename based on input filename and selected format: +- Render a `png` image with a filename based on the input filename and output format (uppercase -O): -`dot -Tpng -O {{path/to/file.dot}}` +`dot -T {{png}} -O {{path/to/input.gv}}` -- Create an SVG from DOT file: +- Render a `svg` image with the specified output filename (lowercase -o): -`dot -Tsvg -o {{path/to/out_file.svg}} {{path/to/file.dot}}` +`dot -T {{svg}} -o {{path/to/image.svg}} {{path/to/input.gv}}` + +- Render the output in `ps`, `pdf`, `svg`, `fig`, `png`, `gif`, `jpg`, `json`, or `dot` format: + +`dot -T {{format}} -O {{path/to/input.gv}}` + +- Render a `gif` image using stdin and stdout: + +`echo "{{digraph {this -> that} }}" | dot -T {{gif}} > {{path/to/image.gif}}` + +- Display help: + +`dot -?` diff --git a/pages/common/fdp.md b/pages/common/fdp.md new file mode 100644 index 000000000..d3f41a59a --- /dev/null +++ b/pages/common/fdp.md @@ -0,0 +1,25 @@ +# fdp + +> Render an image of a `force-directed` network graph from a `graphviz` file. +> Layouts: `dot`, `neato`, `twopi`, `circo`, `fdp`, `sfdp`, `osage` & `patchwork`. +> More information: . + +- Render a `png` image with a filename based on the input filename and output format (uppercase -O): + +`fdp -T {{png}} -O {{path/to/input.gv}}` + +- Render a `svg` image with the specified output filename (lowercase -o): + +`fdp -T {{svg}} -o {{path/to/image.svg}} {{path/to/input.gv}}` + +- Render the output in `ps`, `pdf`, `svg`, `fig`, `png`, `gif`, `jpg`, `json`, or `dot` format: + +`fdp -T {{format}} -O {{path/to/input.gv}}` + +- Render a `gif` image using stdin and stdout: + +`echo "{{digraph {this -> that} }}" | fdp -T {{gif}} > {{path/to/image.gif}}` + +- Display help: + +`fdp -?` diff --git a/pages/common/neato.md b/pages/common/neato.md new file mode 100644 index 000000000..26cc9a0b8 --- /dev/null +++ b/pages/common/neato.md @@ -0,0 +1,25 @@ +# neato + +> Render an image of a `linear undirected` network graph from a `graphviz` file. +> Layouts: `dot`, `neato`, `twopi`, `circo`, `fdp`, `sfdp`, `osage` & `patchwork`. +> More information: . + +- Render a `png` image with a filename based on the input filename and output format (uppercase -O): + +`neato -T {{png}} -O {{path/to/input.gv}}` + +- Render a `svg` image with the specified output filename (lowercase -o): + +`neato -T {{svg}} -o {{path/to/image.svg}} {{path/to/input.gv}}` + +- Render the output in `ps`, `pdf`, `svg`, `fig`, `png`, `gif`, `jpg`, `json`, or `dot` format: + +`neato -T {{format}} -O {{path/to/input.gv}}` + +- Render a `gif` image using stdin and stdout: + +`echo "{{graph {this -- that} }}" | neato -T {{gif}} > {{path/to/image.gif}}` + +- Display help: + +`neato -?` diff --git a/pages/common/osage.md b/pages/common/osage.md new file mode 100644 index 000000000..ced82d422 --- /dev/null +++ b/pages/common/osage.md @@ -0,0 +1,25 @@ +# osage + +> Render an image of a `clustered` network graph from a `graphviz` file. +> Layouts: `dot`, `neato`, `twopi`, `circo`, `fdp`, `sfdp`, `osage` & `patchwork`. +> More information: . + +- Render a `png` image with a filename based on the input filename and output format (uppercase -O): + +`osage -T {{png}} -O {{path/to/input.gv}}` + +- Render a `svg` image with the specified output filename (lowercase -o): + +`osage -T {{svg}} -o {{path/to/image.svg}} {{path/to/input.gv}}` + +- Render the output in `ps`, `pdf`, `svg`, `fig`, `png`, `gif`, `jpg`, `json`, or `dot` format: + +`osage -T {{format}} -O {{path/to/input.gv}}` + +- Render a `gif` image using stdin and stdout: + +`echo "{{digraph {this -> that} }}" | osage -T {{gif}} > {{path/to/image.gif}}` + +- Display help: + +`osage -?` diff --git a/pages/common/patchwork.md b/pages/common/patchwork.md new file mode 100644 index 000000000..72688623c --- /dev/null +++ b/pages/common/patchwork.md @@ -0,0 +1,25 @@ +# patchwork + +> Render an image of a `squareified treemap` network graph from a `graphviz` file. +> Layouts: `dot`, `neato`, `twopi`, `circo`, `fdp`, `sfdp`, `osage` & `patchwork`. +> More information: . + +- Render a `png` image with a filename based on the input filename and output format (uppercase -O): + +`patchwork -T {{png}} -O {{path/to/input.gv}}` + +- Render a `svg` image with the specified output filename (lowercase -o): + +`patchwork -T {{svg}} -o {{path/to/image.svg}} {{path/to/input.gv}}` + +- Render the output in `ps`, `pdf`, `svg`, `fig`, `png`, `gif`, `jpg`, `json`, or `dot` format: + +`patchwork -T {{format}} -O {{path/to/input.gv}}` + +- Render a `gif` image using stdin and stdout: + +`echo "{{digraph {this -> that} }}" | patchwork -T {{gif}} > {{path/to/image.gif}}` + +- Display help: + +`patchwork -?` diff --git a/pages/common/sfdp.md b/pages/common/sfdp.md new file mode 100644 index 000000000..b4289cf6a --- /dev/null +++ b/pages/common/sfdp.md @@ -0,0 +1,25 @@ +# sfdp + +> Render an image of a `scaled force-directed` network graph from a `graphviz` file. +> Layouts: `dot`, `neato`, `twopi`, `circo`, `fdp`, `sfdp`, `osage` & `patchwork`. +> More information: . + +- Render a `png` image with a filename based on the input filename and output format (uppercase -O): + +`sfdp -T {{png}} -O {{path/to/input.gv}}` + +- Render a `svg` image with the specified output filename (lowercase -o): + +`sfdp -T {{svg}} -o {{path/to/image.svg}} {{path/to/input.gv}}` + +- Render the output in `ps`, `pdf`, `svg`, `fig`, `png`, `gif`, `jpg`, `json`, or `dot` format: + +`sfdp -T {{format}} -O {{path/to/input.gv}}` + +- Render a `gif` image using stdin and stdout: + +`echo "{{digraph {this -> that} }}" | sfdp -T {{gif}} > {{path/to/image.gif}}` + +- Display help: + +`sfdp -?` diff --git a/pages/common/twopi.md b/pages/common/twopi.md new file mode 100644 index 000000000..9f95458e9 --- /dev/null +++ b/pages/common/twopi.md @@ -0,0 +1,25 @@ +# twopi + +> Render an image of a `radial` network graph from a `graphviz` file. +> Layouts: `dot`, `neato`, `twopi`, `circo`, `fdp`, `sfdp`, `osage` & `patchwork`. +> More information: . + +- Render a `png` image with a filename based on the input filename and output format (uppercase -O): + +`twopi -T {{png}} -O {{path/to/input.gv}}` + +- Render a `svg` image with the specified output filename (lowercase -o): + +`twopi -T {{svg}} -o {{path/to/image.svg}} {{path/to/input.gv}}` + +- Render the output in `ps`, `pdf`, `svg`, `fig`, `png`, `gif`, `jpg`, `json`, or `dot` format: + +`twopi -T {{format}} -O {{path/to/input.gv}}` + +- Render a `gif` image using stdin and stdout: + +`echo "{{digraph {this -> that} }}" | twopi -T {{gif}} > {{path/to/image.gif}}` + +- Display help: + +`twopi -?`