W3cubDocs

/Graphviz

nodesep

In dot, nodesep specifies the minimum space between two adjacent nodes in the same rank, in inches

type: double, default: 0.25, minimum: 0.02

For other layouts, nodesep affects the spacing between loops on a single node, or multiedges between a pair of nodes.

Small node separation
digraph {
    nodesep=0.1;
    node1; node2; node3;
}
Large node separation
digraph {
    nodesep=0.5;
    node1; node2; node3;
}
Valid on:
  • Graphs

© 2025 The Graphviz Authors
Licensed under the Eclipse Public License 1.0.
https://www.graphviz.org/docs/attrs/nodesep/