HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

gvgen — Generate simple, structured abstract graphs. More information: <https://graphviz.org/pdf/gvgen.1.pdf

Submitted by: @import:tldr-pages··
0
Viewed 0 times
simplegvgencommandabstractcligraphsstructuredgenerate

Problem

How to use the gvgen command: Generate simple, structured abstract graphs. More information: <https://graphviz.org/pdf/gvgen.1.pdf>.

Solution

gvgen — Generate simple, structured abstract graphs. More information: <https://graphviz.org/pdf/gvgen.1.pdf>.

Generate a [c]ycle with 10 vertices and edges and write it to stdout:
gvgen -c {{10}}


Generate a 4×3 [g]rid:
gvgen -g {{4,3}}


Generate a binary [t]ree of height 5:
gvgen -t {{5}}


Generate a complete [b]ipartite graph with 3 and 4 vertices:
gvgen -b {{3,4}}


Create a [r]andom graph and [o]utput it to a file:
gvgen -r {{10,5}} -o {{random.gv}}


Generate a [d]irected graph with [v]erbose output:
gvgen -d -v -c {{6}}


Display help:
gvgen -?

Code Snippets

Generate a [c]ycle with 10 vertices and edges and write it to `stdout`

gvgen -c {{10}}

Generate a 4×3 [g]rid

gvgen -g {{4,3}}

Generate a binary [t]ree of height 5

gvgen -t {{5}}

Generate a complete [b]ipartite graph with 3 and 4 vertices

gvgen -b {{3,4}}

Create a [r]andom graph and [o]utput it to a file

gvgen -r {{10,5}} -o {{random.gv}}

Context

tldr-pages: common/gvgen

Revisions (0)

No revisions yet.