gml2gv
Convert GML graph format to Graphviz DOT
TLDR
Convert a graph from gml to gv format
Convert a graph using stdin and stdout
Display help
SYNOPSIS
gml2gv [ -h ] [ -ooutfile ] [ file ]
PARAMETERS
-h
Print usage information and exit.
-ooutfile
Write output to outfile instead of stdout.
file
Input GML file; if omitted, read from stdin.
DESCRIPTION
gml2gv is a command-line utility from the Graphviz suite.
It translates graph descriptions written in GML (Graph Modeling Language), a plain-text format for nodes, edges, and attributes, into Graphviz DOT language.
GML input is read from a specified file or standard input, producing equivalent DOT output for use with layout tools like dot, neato, or fdp.
The converter preserves graph structure, directed/undirected edges, and common attributes (e.g., labels, colors) where possible. Complex or non-standard GML features may be ignored or approximated, potentially losing some data.
Ideal for integrating GML data with Graphviz visualization workflows.
CAVEATS
Not all GML attributes have direct DOT equivalents, leading to potential data loss.
Handles basic graphs; advanced features may require manual adjustment.
EXAMPLE
gml2gv graph.gml -o graph.dot
dot -Tpng graph.dot -o graph.png
INSTALLATION
Included in Graphviz package: apt install graphviz (Debian/Ubuntu) or dnf install graphviz (Fedora).
HISTORY
Developed as part of Graphviz, started at AT&T Bell Labs in 1991; gml2gv added to support GML interchange.


