Graphlet (.gml) Graph Format
Graphlet file format
Description
Examples
Graphlet GML (Graph Modelling Language) is a text-based file format for storing a single directed or undirected graph.
The GraphTheory[ImportGraph] and GraphTheory[ExportGraph] commands can read from and write to this format.
The general-purpose commands Import and Export also support this format.
Import a Graphlet file encoding the Petersen graph.
Petersen≔Import⁡example/petersen.gml,base=datadir
Petersen≔Graph 1: an undirected graph with 10 vertices and 15 edge(s)
GraphTheory:-DrawGraph⁡Petersen
Import a Graphlet file encoding the constellation Draco.
Draco≔Import⁡example/draco.gml,base=datadir
Draco≔Graph 2: an undirected graph with 14 vertices and 14 edge(s)
GraphTheory:-DrawGraph⁡Draco
Export the Herschel graph to a Graphlet file in the home directory of the current user.
HerschelG≔GraphTheory:-SpecialGraphs:-HerschelGraph⁡
HerschelG≔Graph 3: an undirected graph with 11 vertices and 18 edge(s)
Export⁡herschel.gml,HerschelG,base=homedir
1225
See Also
Formats
GraphTheory
Download Help Document