JGF (.jgf) Graph Format
JGF file format
Description
Examples
References
JGF (JSON Graph Format) is a JSON-based file format for storing one or more graphs.
It also allows the application of labels to vertices and edges.
The format supports directed and undirected graphs, and permits the association of arbitrary metadata with vertices and edges.
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 JGF displaying the relationships of various mammal species.
Mammals≔Import⁡example/mammals.jgf,base=datadir
Mammals≔Graph 1: a directed graph with 18 vertices and 17 arc(s)
GraphTheory:-DrawGraph⁡Mammals,style=spring
RPS≔Import⁡example/RockPaperScissors.jgf,base=datadir
RPS≔Graph 2: a directed graph with 3 vertices and 3 arc(s)
GraphTheory:-DrawGraph⁡RPS
Export the Clebsch graph to a JGF file in the home directory of the current user.
CG≔GraphTheory:-SpecialGraphs:-ClebschGraph⁡
CG≔Graph 3: an undirected graph with 16 vertices and 40 edge(s)
Export⁡clebsch.jgf,CG,base=homedir
2516
JSON Graph Format Specification, http://jsongraphformat.info/.
See Also
Formats
Formats,JSON
GraphTheory
Download Help Document