graphvizで数式を使う

dot2texでtikzに変換してからstandaloneクラスを使って図を出力する。

gist.github.com