Technique for optimizing the layout

type: string, default: major

neato supports modes:

  • mode="major": neato uses stress majorization1.
  • mode="KK": neato uses the Kamada-Kawai2 version of the gradient descent method. KK is sometimes appreciably faster for small (number of nodes < 100) graphs. A significant disadvantage is that KK may cycle.
  • mode="sgd": neato uses a version of the Stochastic Gradient Descent3 method. sgd's advantage is faster and more reliable convergence than both the previous methods, while sgd's disadvantage is that it runs in a fixed number of iterations and may require larger values of maxiter in some graphs.

There are two experimental modes in neato:

  • mode="hier", which adds a top-down directionality similar to the layout used in dot, and
  • mode="ipsep", which allows the graph to specify minimum vertical and horizontal distances between nodes. (See the sep attribute.)
Valid on:
  • Graphs

Note: neato only.

Search the Graphviz codebase for "mode"

Last modified June 8, 2024: remove sfdp modes documentation (ac392fa)