Annotated GML file
This page shows an example of a graph in GML file. Each
tag is annotated with a description.
Graph in GML format
graph [
id 1
label "This is the label of the graph"
node [
id 1
label "This is the label of the node"
graphics [
x 10.0
y 10.0
]
]
edge [
source 1
target 2
label "This is the label of the edge"
graphics [
line [
point [
x 10.0
y 10.0
]
point [
x 10.0
y 20.0
]
point [
x 20.0
y 20.0
]
]
]
]
]
Descriptions
- graph (list)
-
The tag graph starts a new graph. Common tags within
graph are node and edge.
- node (list)
-
The tag node starts a new node. Common tags within
node are id, label
and graphics.
- edge (list)
-
The tag edge starts a new edge. Common tags within
edge are source, target, label, and graphics.
- id (integer)
-
id defines an identifier for an object. The
values of id tags must be unique under certain
constraints (for example, there may not be two nodes with the
same id).
Details are defined in the manual.
- label (string)
-
label defines a textual label attached to an object.
Typically, labels are attached to node or edge.
- graphics (list)
-
graphics defines the graphical representation of a graph, node or edge. Graphlet defines a separate tag LabelGraphics which optionally defines the
graphical representation of the label.
- center (list)
-
center defines the center of an object, typically a node. center contains x, y and optionally z.
- point (list)
-
point defines a point. point contains x, y and optionally z.
- line (list)
-
line defines a polyline, typically to describe an edge.
line contains point objects.
- x (double)
-
In context of graphics or point,
x defines an x coordinate.
- y (double)
-
In context of graphics or point,
y defines an y coordinate.
- z (double)
-
In context of graphics or point,
z defines an z coordinate.
- h (double)
-
In context of graphics,
h defines the height of an object.
- w (double)
-
In context of graphics,
w defines the width of an object. It is usually
used in combination with center to define the geometry of an
object.
Graphlet Documentation 1.17
Graphlet 1.5.2
Date: 10/25/96