Examples for 'igraph::layout_as_star'


Generate coordinates to place the vertices of a graph in a star-shape

Aliases: layout_as_star layout.star as_star

Keywords: graphs

### ** Examples


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

[Package igraph version 1.3.1 Index]