特定のノードの緯度と経度の値のセットがあります。これらの緯度、経度を x、y に投影し、それらを .dot コードに供給し、graphviz 2.29 を使用してグラフを生成しました。コマンドは次のとおりです。
neato -Tpng -o sample.png sourcegv.dot
出力グラフは次のとおりです。 http://www.freeimagehosting.net/brpnt
このグラフを生成するためのソース コードは次のとおりです。
digraph {
rankdir=LR;
subgraph cluster1{
label="cluster 1"
node[style=filled,color=cornflowerblue, fontcolor=white]
edge[arrowhead=vee, color=maroon]
n0[label="192.168.8.9" pos = "69.0,15.5!"];
n1[label="192.168.8.8" pos = "70.25,12.75!"];
n2[label="192.168.8.6" pos = "78.0,9.5!"];
n0 -> n1 ;
n1 -> n2 ;
n0 -> n2 ;
n2 -> n1 ;
n2 -> n0 ;
n1 -> n0 ;
};
subgraph cluster2{
label="cluster 2"
node[style=filled,color=cornflowerblue, fontcolor=white]
edge[arrowhead=vee, color=maroon]
m0[label="192.168.8.9" pos = "70.5,18.25!"];
m1[label="192.168.8.8" pos = "75.25,17.75!"];
m2[label="192.168.8.6" pos = "70.25,16.5!"];
m0 -> m1;
m1 -> m2 ;
m0 -> m2 ;
m2 -> m1 ;
m2 -> m0 ;
m1 -> m0 ;
};
}
ノードを緯度と経度で指定された位置に固定できるように、グラフを実際の地図(Google EarthやGooglemapなど)にプロットできるように、いくつかの方法を探しています。
ありがとうございました。