Skip to content

fdp — 7 goldens

Force-directed (Fruchterman–Reingold) layout for undirected graphs. Each graph below is rendered live in your browser by the library.

rendering…
fdp-simpleiterative6-node undirected graph
DOT source
// @knowvah/dot-engine reference input: 6-node undirected graph
// engine: fdp
// tolerance: iterative
graph G {
    A -- B;
    A -- C;
    B -- D;
    C -- D;
    D -- E;
    E -- F;
    F -- A;
}
rendering…
fdp-clusteriterativeUndirected graph with two cluster subgraphs
DOT source
// @knowvah/dot-engine reference input: undirected graph with two cluster subgraphs
// engine: fdp
// tolerance: iterative
graph G {
    subgraph cluster_0 {
        label="Left";
        A -- B -- C;
    }
    subgraph cluster_1 {
        label="Right";
        D -- E -- F;
    }
    C -- D;
}
rendering…
fdp-disconnectediterativeTwo 4-node undirected components
DOT source
// @knowvah/dot-engine reference input: two 4-node undirected components
// engine: fdp
// tolerance: iterative
graph G {
    A -- B -- C -- D -- A;
    E -- F -- G -- H -- E;
}
rendering…
fdp-edge-bothiterativeUndirected graph with dir=both edges
DOT source
// @knowvah/dot-engine reference input: edges with dir=both
// engine: fdp
// tolerance: iterative
graph G {
    A -- B [dir=both];
    B -- C [dir=both];
    C -- D [dir=both];
    D -- A [dir=both];
}
rendering…
fdp-largeiterative20-node undirected graph; ref: graphviz 15.0.0 dot -Kfdp -Tsvg. Node centers are BYTE-IDENTICAL to the ref; the only delta is text baseline @y 0.85pt — the intended Estimate vertical metric (yoffset_centerline 0.1*fs), which the ref predates. C-ref tolerance 1pt (iterative) absorbs it; portReference pins the exact port output at 0.01pt.
DOT source
// @knowvah/dot-engine reference input: 20-node undirected graph
// engine: fdp
// tolerance: iterative
graph G {
    n0 -- n1; n1 -- n2; n2 -- n3; n3 -- n4;
    n4 -- n5; n5 -- n6; n6 -- n7; n7 -- n8;
    n8 -- n9; n9 -- n10; n10 -- n11; n11 -- n12;
    n12 -- n13; n13 -- n14; n14 -- n15; n15 -- n16;
    n16 -- n17; n17 -- n18; n18 -- n19; n19 -- n0;
    n0 -- n5; n5 -- n10; n10 -- n15; n15 -- n0;
}
rendering…
fdp-nested-clusteriterativeUndirected graph with cluster inside a cluster
DOT source
// @knowvah/dot-engine reference input: cluster inside a cluster
// engine: fdp
// tolerance: iterative
graph G {
    subgraph cluster_outer {
        label="Outer";
        subgraph cluster_inner {
            label="Inner";
            A -- B -- C;
        }
        D -- A;
        C -- E;
    }
    F -- D;
}
rendering…
fdp-tiny-self-loopiterative3-node undirected graph with self-loop; libm-chaotic: ARM libm vs Apple libm, maxDelta=2.0pt; drift pinned by portReference; ref: graphviz 15.0.0 dot -Kfdp -Tsvg
DOT source
// @knowvah/dot-engine reference input: 3-node undirected graph with a self-loop
// engine: fdp
// tolerance: iterative
graph G {
    A -- A;
    A -- B;
    B -- C;
}