I try to use dot for drawing a graph, and I have the following problem
The label for node b
overlaps with the edge from a
to b
. Is there a way to move this label somehow to avoid this?
This is the code I use to generate the image (using dot
)
digraph A {
rankdir=LR;
center=true; margin=0.3;
nodesep=1.5; ranksep=0.5;
node [shape=point, height=".2", width=".2"];
a [xlabel="a"];
b [xlabel="b"];
c [xlabel="c"];
a -> b -> c;
a -> c;
}
This happens quite often and it's annoying (same here, but with edges):
I understand that this is caused by the fact that xlabel
s are put after all the things were laid out, but I was wondering if it's possible to help it a bit - i.e. say it where the label needs to be placed.