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

The accepted answer is correct about using the peripheries attribute for multiple node outlines.

However, using the color white to draw widely-separated double edges between nodes is not ideal. If such an edge is drawn over a non-white background or crosses non-white objects, a white line will be visible. It is much better to use one of the colors none or invis. To update part of the example from the accepted answer:

graph G {
    Foo [peripheries = 2]
    Foo -- Bar [color = "black:invis:black"]
}

See the Graphviz color documentation for more information.


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"]
}