edge
A relation between two vertices in a network.
edgeOn this page


#Attributes
from#id of the vertex the edge leaves.network-refCan be written as shorthand:
edge:valueto#id of the vertex the edge meets.network-refweightThe edge's weight: its length to a shortest path, its thickness under a nameless
edges(width: weight), and its words under show-weights:. Never negative — a relation that opposes is sign: negative. An unweighted edge on a weighted network weighs 1.labelRich inline text set at the edge's midpoint.
signpositive or negative: a + or − set along the edge near its end, the causal-loop mark for a link that reinforces or opposes.nonepositivenegativeDefault
nonecolourThe stroke's hue; unset, a neutral grey.
paintAlso written:
colordashedA dashed stroke.
Default
falsehiddenDeclared but not drawn. It still counts in every measurement and every path. Animatable.
Default
false#Allowed in
#Examples


network{
vertex#a{A}
vertex#b{B}
edge(from: #a; to: #b; weight: 4)
}(
show-weights: true
)

network{
vertex#births{Births}(shape: none)
vertex#population{Population}(shape: none)
edge(from: #births; to: #population; sign: positive)
}(
directed: arrows
)

network:circle{
vertex#a{A}
vertex#b{B}
vertex#c{C}
edge(from: #a; to: #b)
edge(from: #b; to: #c)
cue.draw{
edge(from: #c; to: #a; label: feedback)
}(
in: 2
)
}(
directed: arrows
)#Notes
- The endpoints are
#ids of vertices in the same environment; an id no vertex declares is a compile error. - On a network with
direction: arrowsthe edge runs fromfromtotoand carries a head. - Two edges between the same pair bow apart so both stay visible.
- An edge from a vertex to itself is a loop over it.
cue.drawstrokes an edge in; adashed:edge fades in instead.