・ Http://ruby.kyoto-wu.ac.jp/info-com/Softwares/Graphviz/ Access to ・ Download graphviz-2.38.zip, unzip it, and save it in a suitable location. -For example, if you save in C: \ graphviz, pass Path to C: \ graphviz \ release \ bin ・ Restart your computer
from graphviz import Digraph
g = Digraph(engine='neato', format='png')
g.node('0', label="place1", fontname='Meiryo UI', shape = "box", pos="0,0!")
g.node('1',label="place2", fontname='Meiryo UI', shape = "box", pos="10,0!")
g.edge("0","1",label="100", fontname='Meiryo UI')
g.view()#Draw with this
・ The type of engine is circo Circular graph. dot Hierarchical graph. Suitable for directed graphs. Default layout engine Graph of fdp spring model. Suitable for undirected graph. Graph of neato spring model. Suitable for undirected graph. osage array type graph. sfdp A multi-scale version of fdp. Suitable for large undirected graphs. twopi Radial graph. Nodes are arranged concentrically.
Recommended Posts