一个简单的布局生成器,将一个顶点放置在圆的中心,其余顶点等距地放置在圆周上。
用法
layout_as_star(graph, center = V(graph)[1], order = NULL)
as_star(...)
参见
layout()
和 layout_with_drl()
用于其他布局算法,plot.igraph()
和 tkplot()
用于如何绘制图,star()
用于如何创建环形图。
其他图布局:add_layout_()
, component_wise()
, layout_()
, layout_as_bipartite()
, layout_as_tree()
, layout_in_circle()
, layout_nicely()
, layout_on_grid()
, layout_on_sphere()
, layout_randomly()
, layout_with_dh()
, layout_with_fr()
, layout_with_gem()
, layout_with_graphopt()
, layout_with_kk()
, layout_with_lgl()
, layout_with_mds()
, layout_with_sugiyama()
, merge_coords()
, norm_coords()
, normalize()
作者
Gabor Csardi csardi.gabor@gmail.com
示例
g <- make_star(10)
layout_as_star(g)
#> [,1] [,2]
#> [1,] 0.0000000 0.0000000
#> [2,] 1.0000000 0.0000000
#> [3,] 0.7660444 0.6427876
#> [4,] 0.1736482 0.9848078
#> [5,] -0.5000000 0.8660254
#> [6,] -0.9396926 0.3420201
#> [7,] -0.9396926 -0.3420201
#> [8,] -0.5000000 -0.8660254
#> [9,] 0.1736482 -0.9848078
#> [10,] 0.7660444 -0.6427876
## Alternative form
layout_(g, as_star())
#> [,1] [,2]
#> [1,] 0.0000000 0.0000000
#> [2,] 1.0000000 0.0000000
#> [3,] 0.7660444 0.6427876
#> [4,] 0.1736482 0.9848078
#> [5,] -0.5000000 0.8660254
#> [6,] -0.9396926 0.3420201
#> [7,] -0.9396926 -0.3420201
#> [8,] -0.5000000 -0.8660254
#> [9,] 0.1736482 -0.9848078
#> [10,] 0.7660444 -0.6427876