graphviz + php 画图

header("Content-type:image/png;");

$content = "digraph call_graph{

N1[shape=polygon,sides=6,label=\"A\",width=1, fontsize=15,style=filled,fillcolor=red]; N2[shape=polygon,sides=5,label=\"b\" ,width=1,fontsize=14 ,style=filled,fillcolor=yellow]; N3[shape=polygon,sides=5,label=\"c\" ,width=1,fontsize=14 ,style=filled,fillcolor=yellow]; N4[shape=polygon,sides=5,label=\"d\" ,width=1,fontsize=14 ,style=filled,fillcolor=yellow]; N1->N2[arrowsize=2.0,label=\"out\",headlabel=\"2\",taillabel=\"2\"];

N2->N3[arrowsize=2.0,label=\"out\",headlabel=\"2\",taillabel=\"2\"];

N3->N4[arrowsize=2.0,label=\"out\",headlabel=\"2\",taillabel=\"2\"];

N4->N2[arrowsize=2.0,label=\"out\",headlabel=\"2\",taillabel=\"2\"];

}";

 

passthru("echo \"$content\"|dot -Tpng");

 


graphviz + php 画图
 

 

你可能感兴趣的:(dot,Graphviz)