Graphviz Examples

Page 1

9/27/2020

Graphviz (dot) examples

Search notes:

Graphviz (dot) examples Some examples on how to use Graphviz.

Dotted edges etc

digraph D { A [shape=diamond] B [shape=box] C [shape=circle] A -> B [style=dashed, color=grey] A -> C [color="black:invis:black"] A -> D [penwidth=5, arrowhead=none] } Github respository about-Graphviz, path: /examples/dotted-edge.dot

Shape: record vs. plaintext If the shape attribute is set to record, the text (as controlled with the label attribute) is layouted in tabular form. The vertical bar (|) starts a new row or column. The curly braces { ... } change (flip) the direction of |.

digraph D { node [fontname="Arial"]; node_A [shape=record label="shape=record|{above|middle|below}|right"]; node_B [shape=plaintext label="shape=plaintext|{curly|braces and|bars without}|effect"]; } Github respository about-Graphviz, path: /examples/shape-record-vs-plaintext.dot

Multiple edges Normally, a dependency (an edge) is declared with an arrow: Node1 -> Node2. Multiple nodes can be listed in curly braces, thus declaring multple edges in one go. https://renenyffenegger.ch/notes/tools/Graphviz/examples/index

1/12


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.