first commit

This commit is contained in:
douboer
2025-09-17 16:08:16 +08:00
parent 9395faa6b2
commit 3ff47c11d5
1318 changed files with 117477 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
# This is a single-node graph with a comment:
[ Bonn ]

View File

@@ -0,0 +1,4 @@
# A node pointing back to itself
[ Bonn ] -> [ Bonn ]

View File

@@ -0,0 +1,5 @@
# 2 nodes, one pointing back to itself
[ Bonn ] -> [ Berlin ]
[ Bonn ] -> [ Bonn ]

View File

@@ -0,0 +1,6 @@
# 2 nodes, one pointing back to itself
[ Ruhleben ] -> [ Aschersleben ]
[ Aschersleben ] -> [ Ruhleben ]
[ Ruhleben ] -> [ Ruhleben ]

View File

@@ -0,0 +1,3 @@
[ Bonn ] -> [ Berlin ]

View File

@@ -0,0 +1,3 @@
[ Berlin\n (West) ] -> [ Berlin\n (Ost) ]

View File

@@ -0,0 +1,2 @@
[ Kiel ] -> [ Kassel ]
[ Kassel ] -> [ Wismar ]

View File

@@ -0,0 +1,2 @@
# anonymous, invisible nodes
[ ] -> [ Heilbronn ] -> []

View File

@@ -0,0 +1,11 @@
# Different edge styles
[ Bonn ] <-> [ Berlin ] # bidirectional
[ Berlin ] ==> [ Rostock ] # double
[ Hamburg ] ..> [ Altona ] # dotted
[ Dresden ] - > [ Bautzen ] # dashed
[ Schweinfurt ] <=> [ Ulm ] # bidrectional, double
[ Magdeburg ] .-> [ Burg ] # dot-dash
[ Burg ] -- [ Wolfen ] # single, bidirectional w/o arrows
[ Wolfen ] .. [ Coswig ] # dotted, bidirectional w/o arrows
[ Magdeburg ] ..> [ Aue ] # dotted, going downwards

View File

@@ -0,0 +1,3 @@
# two unconnected parts of a graph
[ Kiel ] -> [ Kassel ]
[ Koblenz ] -> [ Konstanz ]

View File

@@ -0,0 +1,7 @@
# override defaults for nodes, edges, groups and graph
node { color: brown; }
graph { fill: #990066; border: 1px solid black; }
group { fill: grey; }
edge { color: white; }
[ Wismar ] -> [ Neustadt ]

View File

@@ -0,0 +1,2 @@
# override attributes of only one node
[ Bonn ] { color: red; } -> [ Berlin ]

View File

@@ -0,0 +1,2 @@
# Override the text of a node with the label attribute
[ Bonn ] -> [ Berlin ] -> [ Bonn2 ] { label: Bonn; }

View File

@@ -0,0 +1,2 @@
# Override attributes of an edge
[ Bonn ] -> { color: blue; label: Autobahn; } [ Berlin ]

View File

@@ -0,0 +1,16 @@
# Different node shapes
node { shape: ellipse; }
node.lilac { background: #deadff; }
[ Bergheim ] { shape: diamond; } ->
[ Kirchheim ] { shape: triangle; } ->
[ Weilheim ] { shape: house; }
[ Wilhelmshaven ] { shape: invisible; } ->
[ Cuxhaven ] { shape: rounded; } ->
[ Zeven ] { class: lilac; }
[ Bremerhaven ] { shape: circle; } ->
[ Templin ] { shape: triangle; }

View File

@@ -0,0 +1,5 @@
# nodes in a subclass with attributes
node.city { color: brown; } # override default color
[ Bonn ] { class: city; } -> [ Berlin ] { class: city; }
[ Berlin ] -> [ Kassel ]

View File

@@ -0,0 +1,5 @@
node.city { color: brown; }
[ Bonn ], [ Berlin ], [ Kassel ] { class: city; }
[ Bonn ] -> [ Berlin ]
[ Kassel ] -> [ Berlin ]

View File

@@ -0,0 +1,2 @@
# a chain of nodes
[ Bonn ] -> [ Berlin ] -> [ Wismar ]

View File

@@ -0,0 +1,4 @@
# node lists on the left side
[ Ulm ], [ Hahn ], [ Wismar ] => [ Frankfurt ]
[ Frankfurt ] -> [ Potsdam ]
[ Frankfurt ], [ Lahn ] -> [ Potsdam ]

View File

@@ -0,0 +1,4 @@
# node lists on both sides
[ Ulm ], [ Hahn ], [ Wismar ] => [ Frankfurt ]
[ Frankfurt ] => [ Stuttgart ], [ Trier ]
[ Potsdam ], [ Cuixhaven ] => [ Bremerhaven ], [ Wismut ]

View File

@@ -0,0 +1,10 @@
[
Bonn
] ->
[
Berlin
(Capital)
]
[
Bonn
] -> [ Wismar ]

View File

@@ -0,0 +1,4 @@
# [ Neustadt \[an der Weinstrasse\] ] ->
# [ Neustadt \[b. Coburg\] ]

View File

@@ -0,0 +1,7 @@
# all nodes in one group
( German Cities
[ Cuxhaven ] -> [ Bremen ]
[ Hamburg ], [ Flensburg ]
)

View File

@@ -0,0 +1,21 @@
# Three non-overlapping groups
group.nrw { fill: #ffa070; }
group.sachsen { fill: #f07070; }
( Bayern
[ Augsburg ]
) { fill: #70b070; }
[ Augsburg ] --> [ Dortmund ]
( Nordrhein-Westfalen
[ Dortmund ] -> [ Olpe ]
--> [ Hamm ]
) { class: nrw; }
( Sachsen
[ Leipzig ]
) { class: sachsen }
[ Hamm ] --> [ Leipzig ]

View File

@@ -0,0 +1,7 @@
# some nodes in a group, and one edge coming in
( German Cities
[ Augsburg ] -> [ Hof ]
)
[ Wien ] -> [ Augsburg ]

View File

@@ -0,0 +1,5 @@
( German Cities
[ Augsburg ] -> [ Hof ]
)
[ Wien ] -> [ German Cities ]

View File

@@ -0,0 +1,4 @@
[ Terminal \#1 ] -> [ Terminal \#2 ]
[ Terminal ( \#3 ) \|-\| ]
[ Neustadt & Neudorf ] -> [ 3 < 4 ]

View File

@@ -0,0 +1,5 @@
# Edges can have labels, too:
[ Kempten ] -- Bahn --> [ Schongau ] # normal edge
[ Schongau ] -- Fahrrad --> [ Regensburg ] # ditto
[ Regensburg ] .. Auto ..> [ Roth ] # dashed
[ Regensburg ] == Motorradkolonne ==> [ Straubing ] # double

View File

@@ -0,0 +1,17 @@
# edges with attributes like title/link/label
# set the base link
graph { linkbase: http%3a//de.wikipedia.org/wiki/; }
# if nothing specified, generate a link from the label
# or none if no label set
edge { autolink: label; }
# these edges always link to "Intercity" regardless of the label
edge.intercity { link: Intercity; }
# autolinks the edge to "Auto"
[ Emden ] - Auto -> [ Schortens ]
# autolinks this edge to "Bahn"
[ Schortens ] --> { label: Bahn; } [ Oldenburg ]
# no link (since no label)
[ Schortens ] --> [ Cuxhaven ]
# links to "Intercity"
[ Oldenburg ] - IC -> { class: intercity; } [ Bremerhaven ]

View File

@@ -0,0 +1,7 @@
# inserted newlines
[
Kempten
] ->
[
Schongau
] # normal edge

View File

@@ -0,0 +1,2 @@
# no spaces
[Kempten]{color:red;}->[Thurgau]{color:blue;}

View File

@@ -0,0 +1,2 @@
# quoting of () inside node
[ Berlin ] -> [ Frankfurt \(Oder\) ]

View File

@@ -0,0 +1,6 @@
# gid, "long" edge, comments and color codes
graph { gid: 123; color: #308030 }
node { color: #f06020 } #this is a comment
node.cities { color: #1460b0; fill: lightgrey; } # this too
[ Leipzig ] { class: cities } ----> [ Oschatz ] # comment

View File

@@ -0,0 +1,6 @@
# different chains of nodes
[ Ulm ] -> [ Lahn ] -> [ Bonn ]
-> [ Trier ]
[ Stein ] -> [ Wahns ]
-> [ Lind ]
-> [ Burg ] -> [ Buch ]

View File

@@ -0,0 +1,2 @@
# Something that follows on the same line
[ Ulm ] -> [ Lahn ] [ Lahn ] -> [ Trier ]

View File

@@ -0,0 +1,16 @@
# Clickable links and mouse-over titles:
graph { linkbase: http://de.wikipedia.org/wiki/ }
node { autolink: label; autotitle: label; }
[ Bonn ]
[ Berlin ] { title: "Berlin (Capital)" }
[ Kassel ] { autolink: none; }
[ Ulm ] { link: "Stuttgart"; }
[ Lahn ] { label: Ulm; }
# link link, title overriden only title
[ Bonn ] -> [ Berlin ] -> [ Kassel ]
# link overriden
[ Bonn ] -> [ Ulm ]
# link goes to "Ulm" (label!)
[ Ulm ] -> [ Lahn ]

View File

@@ -0,0 +1,2 @@
# A node-cluster (autosplit into three single nodes)
[ Waren | Mirow | Bergen ]

View File

@@ -0,0 +1,2 @@
# A node-cluster (autosplit into three single nodes)
[ Husum | Schleswig | Flensburg ] { fill: #ddaaff; }

View File

@@ -0,0 +1,3 @@
# A node-cluster (autosplit into three single nodes)
[ Amrum | Sylt | Fehmarn ] { fill: #ddaaff; }
-> [ Itzehoe ]

View File

@@ -0,0 +1,2 @@
# A node-cluster (autosplit into three single nodes)
[ Waren | Mirow | Bergen \| ]