Skip to main content
Module

x/graphviz/mod.ts>attribute.mode

🦕 Simple Graphviz library for Deno.
Latest
variable attribute.mode
import { attribute } from "https://deno.land/x/graphviz@v0.2.1/mod.ts";
const { mode } = attribute;

Technique for optimizing the layout. For neato, if mode is "major", neato uses stress majorization. If mode is "KK", neato uses a version of the gradient descent method. The only advantage to the latter technique is that it is sometimes appreciably faster for small (number of nodes < 100) graphs. A significant disadvantage is that it may cycle.

There are two experimental modes in neato, "hier", which adds a top-down directionality similar to the layout used in dot, and "ipsep", which allows the graph to specify minimum vertical and horizontal distances between nodes. (See the sep attribute.)

For sfdp, the default mode is "spring", which corresponds to using a spring-electrical model. Setting mode to "maxent" causes a similar model to be run but one that also takes into account edge lengths specified by the "len" attribute.

type

"mode"