Skip to content
GalleryOpen Garphield

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
{
"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.

{
"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 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" } }
}
}
  • fullGraph gives the nodes, links and direction. Each node’s nodeData becomes its fields and layout its position, kept as Gephi Lite has it (both draw with sigma.js, y up); each link’s edgeData becomes its fields. A set Gephi Lite saved, such as a keywords field, becomes a list.
  • appearance sets the bindings the workspace opens with: node and link colour from a field, partition (with its palette) or ranking; node size and link width from a ranking, including Gephi Lite’s computed degree; and node and link labels from a field. 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.
  • filters and 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 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 a group field, outermost first: group, then group 2 for a group inside that group, and so on. A group’s name is its label, 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 its y:Geometry as x and y (with y reversed, since yEd measures it down the screen), its y:Fill colour as color unless the fill is transparent, its y:Shape type as shape, and the side of a square of its area as size (group nodes, whose box is drawn around their members, have none). A link’s first yEd label becomes its label. A property the file sets itself, such as its own label, 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 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 data field becomes a node or link attribute. data.id is the node’s ID; a number and its digits name the same node. A node without a label shows its name.
  • position becomes the node’s starting position. Cytoscape measures y down the screen, so Garphield reverses it to keep the drawing’s orientation.
  • Links are directed, as Cytoscape draws them, unless the file has "directed": false at the top level (NetworkX’s cytoscape_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 parent field.
  • 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 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 attributes become 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 from and to name elements by _id (or a blueprint’s id), 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.
  • direction is directed, mutual or undirected; a missing one takes the default map’s direction. reversed: true turns a directed connection’s arrow round, from to to from. A mutual connection becomes a link each way, and undirected connections beside directed ones become pairs, as in any graph that mixes both. delayed: true is kept as a field.
  • Positions come from the default map’s pinned elements, with y reversed, 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, id or 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, 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.

source,target,weight
a,b,2
b,c,1

Garphield matches source and target headers case-insensitively. Other columns become edge attributes. A table without that header pair opens the graph construction dialog instead.

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.

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.