DotOptions.setArcLabel
- DotOptions.setArcLabel(tail, head, label)
- Parameters:
tail (
int) – the id of the tail of the arc.head (
int) – the id of the head of the arc.label (
str) – the text displayed next to the arc.
- Return type:
None
Example
import pyagrum as gum
bn = gum.fastBN("A->B")
a, b = bn.idFromName("A"), bn.idFromName("B")
options = gum.DotOptions()
options.setArcLabel(a, b, "0.5")
print(next(line.strip() for line in bn.toDot(options).splitlines() if '"A" -> "B"' in line))
# "A" -> "B" [fontsize="10", tooltip="0 → 1", label="0.5"];
Class