Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does one define double-lines for edge and node shapes in graphviz dot?

How can edges and nodes be styled using graphviz dot with doubled lines as shown the in the "LEGAL" and "TAX DISC" nodes of the following diagram?

ER Diagram

like image 922
Judge Maygarden Avatar asked Jun 02 '11 20:06

Judge Maygarden


People also ask

What is the shape of a node?

The special node shapes Msquare, Mcircle, and Mdiamond are simply an ordinary square, circle and diamond with the diagonals style set. The rounded style causes the polygonal corners to be smoothed. Note that this style also applies to record-based nodes.

How do I use dot language?

As another aid for readability, dot allows double-quoted strings to span multiple physical lines using the standard C convention of a backslash immediately preceding a newline character². In addition, double-quoted strings can be concatenated using a '+' operator.


1 Answers

Doubled shapes can be done by using [peripheries=2] on the node

Doubled edges can be done by specifying more than one colour for the edge, separated by a colon. In this case use the same colour twice: [color="black:black"] (or, to separate them slightly more, do [color="black:invis:black"])

I got there eventually! Sorry for the "evolutionary" nature of this answer :-)

So for example

graph G {     Foo [peripheries=2]     Foo -- Bar [color="black:white:black"] } 
like image 122
marnir Avatar answered Sep 22 '22 12:09

marnir