Generate coordinates to place the vertices of a graph in a star-shape
A simple layout generator, that places one vertex in the center of a circle and the rest of the vertices equidistantly on the perimeter.
layout.star(graph, center = V(graph), order = NULL)
- The graph to layout.
- The id of the vertex to put in the center. By default it is the first vertex.
- Numeric vector, the order of the vertices along the perimeter. The default ordering is given by the vertex ids.
It is possible to choose the vertex that will be in the center, and the order of the vertices can be also given.
- A matrix with two columns and as many rows as the number of vertices in the input graph.
g <- graph.star(10) layout.star(g)