GEXF - Maple Help

GEXF (.gexf) Graph Format

GEXF file format

Description

 • GEXF (Graph Exchange XML Format) is an XML-based file format for storing a single undirected or directed 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.

Examples

Import a GEXF file encoding the Petersen graph.

 > $\mathrm{Petersen}≔\mathrm{Import}\left("example/petersen.gexf",\mathrm{base}=\mathrm{datadir}\right)$
 ${\mathrm{Petersen}}{≔}{\mathrm{Graph 1: an undirected unweighted graph with 10 vertices and 15 edge\left(s\right)}}$ (1)
 > $\mathrm{GraphTheory}:-\mathrm{DrawGraph}\left(\mathrm{Petersen}\right)$

Export a Kneser graph to a GEXF file in the home directory of the current user.

 > $\mathrm{KG}≔\mathrm{GraphTheory}:-\mathrm{SpecialGraphs}:-\mathrm{KneserGraph}\left(3,2\right)$
 ${\mathrm{KG}}{≔}{\mathrm{Graph 2: an undirected unweighted graph with 3 vertices and 0 edge\left(s\right)}}$ (2)
 > $\mathrm{Export}\left("kneser.gexf",\mathrm{KG},\mathrm{base}=\mathrm{homedir}\right)$
 ${524}$ (3)

References

 GEXF Format, www.gexf.net