Xlabels for nodes overlap with edges at points

I am trying to use a dot to draw a graph, and I have the following problem.

graph

The label for node b overlaps with an edge from a to b . Is there a way to move this shortcut to avoid this?

This is the code I use to create 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 is annoying (the same here, but with the edges):

enter image description here

I understand that this is due to the fact that xlabel after all the things have been stated, but I was wondering if I could help him a little - for example, where you need to place the shortcut.

+7
graphviz dot
source share
1 answer

You cannot do this - you want to provide location information for xlabel, but graphviz currently (2016-01-25) does not allow this. There is a function to open a function request in the graphviz error tracker for this ability; It is described as:

it is basically a feature request allowing the user to provide location information for xlabels. For xlabels bound to nodes, the coordinates should be relative to the node position. A similar function may contain header and tail labels for edges. I suggest that xlabels for edges can be based on the "center" of the edge.

+5
source share

All Articles