Supported file formats
| Format | Extension | Open | Export | Contains |
|---|---|---|---|---|
| Garphield project | .gph |
✓ | Save | Graph, visual workspace, sets, history, story |
| GEXF | .gexf |
✓ | ✓ | Graph type and attributes; Gephi’s colours, sizes and positions |
| GraphML | .graphml |
✓ | ✓ | Graph type and scalar attributes; yEd groups, labels, positions, colours and shapes on open |
| GML | .gml |
✓ | ✓ | Graph data in a plain-text format |
| Graphviz DOT | .dot, .gv |
✓ | — | Graph topology and scalar attributes |
| Node-link JSON | .json |
✓ | ✓ | NetworkX-shaped graph data |
| Compact JSON | .compact.json, .gf.json, or sniffed .json |
✓ | — | Indexed graph with node/link attributes |
| Cytoscape JSON | .cyjs, or sniffed .json |
✓ | — | Cytoscape elements: data fields and node positions |
| Gephi Lite workspace | sniffed .json |
✓ | — | Attributes, positions, and the fields its appearance draws with |
| Kumu JSON | sniffed .json |
✓ | — | Kumu elements and connections: fields, direction and map positions |
| graph6 | .g6 |
✓ | — | Simple undirected topology only |
| sparse6 | .s6 |
✓ | — | Sparse undirected topology, including loops/parallel links |
| digraph6 | .d6 |
✓ | — | Directed topology, including loops |
| CSV, TSV, text table | .csv, .tsv, .txt |
✓ | — | Edge list, flat-table construction, or two-file graph bundle |
| Plain edge list | .edges, .edgelist, .el |
URL | — | Whitespace-delimited endpoints |
| Matrix Market | .mtx |
URL | — | Sparse matrix as an undirected graph |
| PNG | .png |
— | ✓ | Rendered canvas |
Node-link JSON
Section titled “Node-link JSON”{ "directed": false, "multigraph": false, "graph": {}, "nodes": [{ "id": "a" }, { "id": "b" }], "edges": [{ "source": "a", "target": "b" }]}Garphield accepts the current NetworkX edges key and the older links key.
Garphield uses a node’s label attribute for display and search when present.
Compact JSON
Section titled “Compact JSON”{ "nodes": ["Alice", { "label": "Bob", "group": "staff" }, "Carol"], "edges": [[0, 1], [1, 2, { "weight": 2 }]], "directed": true}Each node’s array position is its node ID. A string node is shorthand for a
label; an object contains node attributes. Each edge is
[sourceIndex, targetIndex] or [sourceIndex, targetIndex, attributes].
directed and multigraph are optional and default to false. Isolates remain
explicit in nodes, and duplicate labels are safe because structure uses array
positions.
This format is intentionally easy for agents to write and compact in inline URLs. It is import-only. Use node-link JSON when the original node IDs, edge keys, or graph attributes must survive.
Gephi writes each node’s colour, size and position as viz:color,
viz:size and viz:position. Positions become x and y; colours and sizes
become the color and size fields. When at least nine nodes in ten have a
colour, and the colours are not all the same, the graph opens with Colour
bound to color, drawn in the file’s own colours; sizes work the same way for
Size. A single colour or size on every node is the exporting tool’s
default, so Garphield’s community colours and degree sizes are kept instead.
These bindings are where the graph starts, like the defaults they replace:
bind another source to restyle the graph. The next graph opened goes back to the
bindings in use before, unless they were changed in the meantime. A saved
.gph document, or a link with its own view, keeps its own bindings.
Gephi Lite workspace
Section titled “Gephi Lite workspace”Gephi Lite saves its workspace as JSON with "type": "gephi-lite" at the top
level. Garphield detects it from that key, in a .json file or pasted text:
{ "type": "gephi-lite", "version": "1.1.2", "graphDataset": { "nodeData": { "0": { "label": "Medici", "color": "rgb(156,110,99)", "size": 10 } }, "edgeData": { "e0": { "weight": 1 } }, "layout": { "0": { "x": 120.5, "y": -40.2 } }, "metadata": { "title": "Florentine families.gexf" }, "fullGraph": { "options": { "type": "undirected", "multi": true, "allowSelfLoops": true }, "nodes": [{ "key": "0" }, { "key": "1" }], "edges": [{ "key": "e0", "source": "0", "target": "1" }] } }, "appearance": { "nodesColor": { "type": "field", "field": { "id": "color" } }, "nodesSize": { "type": "ranking", "field": { "id": "size" } } }}fullGraphgives the nodes, links and direction. Each node’snodeDatabecomes its fields andlayoutits position, kept as Gephi Lite has it (both draw with sigma.js, y up); each link’sedgeDatabecomes its fields. A set Gephi Lite saved, such as a keywords field, becomes a list.appearancesets the bindings the workspace opens with: node and link colour from afield,partition(with its palette) orranking; node size and link width from aranking, including Gephi Lite’s computed degree; and node and link labels from afield. Fixed colours and sizes are drawn with Garphield’s defaults. Other appearance types, and computed fields Garphield does not have, are listed as import notes. As for GEXF, a saved document’s own bindings win.filtersand the layout settings are not read.- A link to a node the graph does not list adds that node, and the import says which. A missing or repeated node key, a link without both ends, and malformed JSON stop the import.
GraphML and yEd
Section titled “GraphML and yEd”GraphML from NetworkX, Gephi, Cytoscape and most other tools is one flat
<graph>, read with its key types, defaults, direction and repeated links.
Nested graphs and yEd graphics change how a file is read:
- Nested graphs. A node may have a
<graph>of its own, which is how yEd saves a group. Every node at every depth opens, and each one inside a group gets the group’s name in agroupfield, outermost first:group, thengroup 2for a group inside that group, and so on. A group’s name is itslabel, else its yEd label, else its ID; two groups at one depth with the same name are told apart by their IDs. The group node itself stays a node, since links may end on the group. - yEd graphics. In a file with yFiles keys, Garphield reads each node’s
first yEd label as
label, the centre of itsy:Geometryasxandy(withyreversed, since yEd measures it down the screen), itsy:Fillcolour ascolorunless the fill is transparent, itsy:Shapetype asshape, and the side of a square of its area assize(group nodes, whose box is drawn around their members, have none). A link’s first yEd label becomes itslabel. A property the file sets itself, such as its ownlabel, keeps the file’s value. The graphics data, and the empty properties yEd writes for every node, do not become fields.
A link to a node the file does not list adds that node, and the import says
which. A node without an id is left out, and the import says how many.
Cytoscape JSON
Section titled “Cytoscape JSON”Cytoscape desktop writes this format from File > Export > Network to
File… with the Cytoscape.js JSON (*.cyjs) type, and Cytoscape.js writes it
from cy.json(). Garphield reads both, with elements either as an object of
nodes and edges or as one array whose entries each have a group:
{ "elements": { "nodes": [ { "data": { "id": "a", "name": "Ada" }, "position": { "x": 0, "y": 0 } }, { "data": { "id": "b", "name": "Grace" }, "position": { "x": 120, "y": 40 } } ], "edges": [{ "data": { "id": "ab", "source": "a", "target": "b", "weight": 2 } }] }}- Each
datafield becomes a node or link attribute.data.idis the node’s ID; a number and its digits name the same node. A node without alabelshows itsname. positionbecomes the node’s starting position. Cytoscape measuresydown the screen, so Garphield reverses it to keep the drawing’s orientation.- Links are directed, as Cytoscape draws them, unless the file has
"directed": falseat the top level (NetworkX’scytoscape_data()writes that). Repeated links between the same pair are kept. - A compound (parent) node opens as an ordinary node, and each child keeps its
parentfield. - Styles, classes, and the zoom and pan are not read. Cytoscape desktop exports styles to a separate file, which Garphield does not open.
- A link to a node the file does not list adds that node, and the import says which nodes it added. A repeated node or link ID stops the import.
Kumu JSON
Section titled “Kumu JSON”Kumu writes this format from the export button in the lower right corner of a
map, with Export to JSON: the whole project, with its elements,
connections, loops, maps and perspectives. Kumu’s import blueprints, with the
same elements and connections arrays, open the same way. Garphield detects
both from a .json file or pasted text whose top level has an elements
array and a connections array:
{ "elements": [ { "_id": "elem-a", "attributes": { "label": "Ada", "element type": "Person" } }, { "_id": "elem-b", "attributes": { "label": "Grace", "tags": ["mentor"] } } ], "connections": [ { "_id": "conn-1", "direction": "directed", "reversed": false, "attributes": { "connection type": "+" }, "from": "elem-a", "to": "elem-b" } ]}- Each element’s
attributesbecome node fields, and each connection’s become link fields. A blueprint’s element and connection keep their fields at the top level instead, which works the same way. - A connection’s
fromandtoname elements by_id(or a blueprint’sid), or by a label only one element has. A connection to an element the file does not list adds that element, and the import says which. directionisdirected,mutualorundirected; a missing one takes the default map’s direction.reversed: trueturns a directed connection’s arrow round, fromtotofrom. A mutual connection becomes a link each way, and undirected connections beside directed ones become pairs, as in any graph that mixes both.delayed: trueis kept as a field.- Positions come from the default map’s pinned elements, with
yreversed, since Kumu measures it down the screen. An element or connection that no map shows, because it was removed from every map, is left out, and the import counts what it left out. - Loops, perspectives, map styles and the project’s field settings are not read.
- An element without an
_id,idor label, a repeated element or connection, an unknown direction, a label several elements share used as a connection’s end, and malformed JSON stop the import.
graph6 family
Section titled “graph6 family”graph6, sparse6, and digraph6 are established printable-ASCII topology formats:
- graph6 stores simple undirected graphs compactly, especially dense ones.
- sparse6 stores sparse undirected graphs and can represent loops and parallel links.
- digraph6 stores directed graphs, including loops, with at most one link for each ordered node pair.
Garphield accepts one graph record per load, with or without the standard
header. Incremental sparse6 records are not accepted because they depend on a
preceding record. These formats include topology only: imported nodes receive
keys and labels 0 through n-1. The loader caps them at 100,000 nodes and
1,000,000 links to prevent tiny declarations from causing unsafe allocations.
For a URL with no matching suffix, especially data:text/plain,..., pass
format=graph6, format=sparse6, or format=digraph6 explicitly.
CSV edge list
Section titled “CSV edge list”source,target,weighta,b,2b,c,1Garphield matches source and target headers case-insensitively. Other
columns become edge attributes. A table without that header pair opens the
graph construction dialog instead.
Two-file CSV graph bundle
Section titled “Two-file CSV graph bundle”Open two CSV or TSV files together from Open in the top strip. Garphield treats the
file with source and target columns as the edge table and the other file as
the node table. It prefers an id column for the node key; when that column is
absent, it infers a key column from the overlap with the edge endpoints. The
node table’s remaining columns become node attributes, with label or name
supplying the displayed label when available.
Garphield classifies the files by their headers, so names such as links.csv
and points.csv work without a special naming convention. You can also open a
single-file edge list or construct a graph from a flat table.
Garphield projects
Section titled “Garphield projects”Use .gph for the graph and its visual work. The Python package and embed
driver use the same project document. Validate projects against the published
GPH schema.