我有一组给定节点的纬度和经度值。我已将这些纬度、经度投影到 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)中绘制图形,以便将节点固定到经纬度给定的位置。
谢谢你。