View source: R/annotate_functions.R
draw_circle | R Documentation |
Draw concentric circles
draw_circle(col = "#00BFFF", use = "focus", max.circle)
col |
color of circles |
use |
one of 'focus' or 'cent' |
max.circle |
if use = 'focus' specifies the number of circles to draw |
this function is best used with a concentric layout such as layout_with_focus and layout_with_centrality.
concentric circles around origin
library(igraph)
g <- sample_gnp(10, 0.4)
## Not run:
library(ggraph)
ggraph(g, layout = "centrality", centrality = degree(g)) +
draw_circle(use = "cent") +
geom_edge_link() +
geom_node_point(shape = 21, fill = "grey25", size = 5) +
theme_graph() +
coord_fixed()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.