I'm trying to make basic polygons with graphviz. I have something like this:
graph {
node [shape=circle]
A [pos="0,1!"]
B [pos="0,0!"]
C [pos="1,0!"]
D [pos="1,1!"]
A -- B
B -- C
C -- D
D -- A
}
which displays the following
I'd like the circles to disappear and look more like this:
I tried switching to shape=point
, but the labels disappear. Any suggestions?
When using shape=point
, adding a xlabel
to each node will display a label outside of the node shape:
A [pos="0,1!", xlabel="A"]
The documentation states that the label will be placed outside the node shape, but near the node itself. However, those labels are placed last and can sometimes be omitted (forcelabels
to the rescue).
The position or an offset can not be defined.