export-graph-to-dot-file

Description

export-graph-to-dot-file adaptor exports a graph as a text file in DOT format.

Inputs

graph Type: graph Required: Yes The graph structure to be exported.

Outputs

dot Type: text A text file in DOT format (.dot).

Examples

Example 1: Default behaviour

Inputs:

graph:

{ 
    "nodes": [ 
                { "id": "a", "label": "a" },
                { "id": "b", "label": "b" },
                { "id": "c", "label": "c" },
                { "id": "d", "label": "d" }
    ],
    "edges": [ 
                { "id": "edge-0", "from": "a", "to": "b", "direction": "none", "attributes": {} },
                { "id": "edge-1", "from": "b", "to": "c", "direction": "none", "attributes": {} },
                { "id": "edge-2", "from": "b", "to": "d", "direction": "none", "attributes": {} } 
    ]
}

Outputs:

dot:

graph graphname {
    a -- b -- c;
    b -- d;
}

-> Created a DOT text file from an undirected graph.

Use Cases

  • Users may convert a graph file to DOT to enable them to build a network visual in Microreact. Use the DOT file as an input into the network argument in the export-to-microreact-project adaptor to do so.

  • Converting a graph to a Dot file makes it compatible with other tools and libraries that support the DOT language.

  • Dot files are human-readable and can be easily shared with others to enable discussion among or inspection of the graph behaviors.

Last updated