> library(igraph)とりあえずツリーグラフを作成する.
> g<-graph.tree(4)
> plot.igraph(g)
> lay<-layout.kamada.kawai(g)再描画.
> lay
[,1] [,2]
[1,] -1.95786789 -0.6726298
[2,] -0.97281249 -1.2272012
[3,] -2.94060962 -0.1762201
[4,] 0.09102538 -0.7586657
[5,] -1.03996471 -2.3633110
[6,] -3.22145269 0.8896139
[7,] -3.96005388 -0.5896342
[8,] 0.59269741 0.2250630
[9,] 1.10354845 -1.2044752
[10,] -1.05079882 -3.4245322
> plot.igraph(g,layout=lay)
ちゃんとレイアウトされた.
0 件のコメント:
コメントを投稿