Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

layout_in_circle

Graph layout with vertices on a circle.


Description

Place vertices on a circle, in the order of their vertex ids.

Usage

layout_in_circle(graph, order = V(graph))

in_circle(...)

Arguments

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 layout_in_circle.

Details

If you want to order the vertices differently, then permute them using the permute function.

Value

A numeric matrix with two columns, and one row for each vertex.

Author(s)

See Also

Examples

## 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)

igraph

Network Analysis and Visualization

v1.2.10
GPL (>= 2)
Authors
See AUTHORS file.
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.