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_as_star(graph, center = V(graph)[1], order = NULL)as_star(...)
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.
Arguments to pass to layout_as_star
.
A matrix with two columns and as many rows as the number of vertices in the input graph.
It is possible to choose the vertex that will be in the center, and the order of the vertices can be also given.
layout
and layout.drl
for other layout
algorithms, plot.igraph
and tkplot
on how to
plot graphs and star
on how to create ring graphs.
Other graph layouts: add_layout_
;
as_bipartite
,
layout.bipartite
,
layout_as_bipartite
; as_tree
,
layout_as_tree
;
component_wise
; in_circle
,
layout_in_circle
;
layout.auto
, layout_nicely
,
nicely
;
layout.davidson.harel
,
layout_with_dh
, with_dh
;
layout.gem
, layout_with_gem
,
with_gem
; layout.graphopt
,
layout_with_graphopt
,
with_graphopt
; layout.grid
,
layout.grid.3d
,
layout.grid.3d
,
layout_on_grid
, on_grid
;
layout.mds
, layout_with_mds
,
with_mds
; layout.merge
,
layout_components
,
merge_coords
,
piecewise.layout
,
piecewise.layout
;
layout.norm
, norm_coords
;
layout.sugiyama
,
layout_with_sugiyama
,
with_sugiyama
;
layout_on_sphere
, on_sphere
;
layout_randomly
, randomly
;
layout_with_fr
, with_fr
;
layout_with_kk
, with_kk
;
layout_with_lgl
, with_lgl
;
layout
, layout_
,
print.igraph_layout_modifier
,
print.igraph_layout_spec
;
normalize
# NOT RUN {
g <- make_star(10)
layout_as_star(g)
## Alternative form
layout_(g, as_star())
# }
Run the code above in your browser using DataLab