DotOptions.setNodeTooltip

DotOptions.setNodeTooltip(node, tooltip)
Parameters:
  • node (int) – the id of the node.

  • tooltip (str) – the text displayed when the mouse is over the node.

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.setNodeTooltip(a, "the cause")
print(next(line.strip() for line in bn.toDot(options).splitlines() if line.strip().startswith('"A" [')))
# "A" [tooltip="the cause"];

Class

DotOptions