Some interesting shape values
| Comments | Synonyms |
box | | rect , rectangle |
circle | | |
cylinder | | |
doublecircle | | |
none | not available in version 2.38 | plaintext |
Mrecord | Creates a record based node | |
plain | Similar to shape=none but enforces width=0 height=0 margin=0 . This guarantees that the size of a node is determined by its label . Not available in version 2.38 | |
plaintext | | |
point | | |
record | Creates a record based node | |
square | | |
underline | | |
The default value for shape
is ellipse
.
digraph SomeShapes {
edge [ style=invis ]
// 1
none [ shape=none ]
point [ shape=point ]
box [ shape=box ]
// 2
plain [ shape=plain ] // Does not work with dot version 2.38
ellipse // default
square [ shape=square ]
// 3
underline [ shape=underline ]
circle [ shape=circle ]
record [ shape=record label="{record|record based node}" ]
// 4
// ...
doublecircle [ shape=doublecircle ]
Mrecord [ shape=Mrecord label="{Mrecord|record based node}" ]
// 5
// ..
cylinder [ shape=cylinder ] // Does not work with dot version 2.38
none -> plain -> underline
point -> ellipse -> circle -> doublecircle -> cylinder
box -> square -> record -> Mrecord
}
Setting the shape attribute for all nodes
Using the statement node [shape = box]
sets the shape attribute to box
for all nodes in a digraph:
digraph {
node [shape = box]
‥ /* Notes and edges */
}