Use this if you are using igraph from R
Place vertices on a circle, in the order of their vertex ids.
layout_in_circle(graph, order = V(graph)) in_circle(...)
graph |
The input graph. |
order |
The vertices to place on the circle, in the order of their desired placement. Vertices that are not included here will be placed at (0,0). |
... |
Passed to |
If you want to order the vertices differently, then permute them using the
permute
function.
A numeric matrix with two columns, and one row for each vertex.
Gabor Csardi csardi.gabor@gmail.com
Other graph layouts: add_layout_
,
component_wise
,
layout_as_bipartite
,
layout_as_star
,
layout_as_tree
,
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
,
layout_
, merge_coords
,
norm_coords
, normalize
## Place vertices on a circle, order them according to their ## community ## Not run: library(igraphdata) data(karate) karate_groups <- cluster_optimal(karate) coords <- layout_in_circle(karate, order = order(membership(karate_groups))) V(karate)$label <- sub("Actor ", "", V(karate)$name) V(karate)$label.color <- membership(karate_groups) V(karate)$shape <- "none" plot(karate, layout = coords) ## End(Not run)