Graphvizで描いたノードに画像を貼り付ける(Pythonで)
ノードの引数に貼り付けたい画像のバスを書くだけ。
from graphviz import Digraph# Ready to parent graph.g = Digraph(comment = 'Graph')g.node('A', 'King Arthur', image="king.png")g.node('B', 'Sir Bedevere the Wise')g.node('L', 'Sir Lancelot the Brave')g.edges(['AB', 'AL'])g.edge('B', 'L', constraint='false')g.view()結果
TODO: 画像に被らないように文字位置を調整する