MPDAG.toDot
- MPDAG.toDot(*args)
The compelled arcs are drawn with the color of the key
dot.compelledArcColorofpyagrum.config. No cluster is drawn: an MPDAG is not always a chain graph.- Parameters:
options (
pyagrum.DotOptions, optional) – what is given to the drawing beyond the look ofpyagrum.config(size, label, colors of some nodes and arcs…); a color given for an arc wins over the color of the compelled arcs.- Returns:
a representation of the MPDAG in the DOT format
- Return type:
str
Example
import pyagrum as gum
mpdag = gum.MPDAG.meekClosure(gum.fastPDAG("A-B->C-D"))
dot = mpdag.toDot()
print("\n".join(line for line in dot.splitlines() if " -> " in line))
# 0 -> 1 [dir="none"];
# 2 -> 3 [color="red"];
# 1 -> 2 [color="red"];
Class