Learn R Programming

graphlayouts (version 0.2.0)

draw_circle: Draw concentric circles

Description

Draw concentric circles

Usage

draw_circle(col = "#00BFFF", use = "focus", max.circle)

Arguments

col

color of circles

use

one of 'focus' or 'cent'

max.circle

if use='focus' specifies the number of circles to draw

Value

concentric circles around origin

Details

this function is best used with a concentric layout such as layout_with_focus and layout_with_centrality.

Examples

Run this code
# NOT RUN {
library(igraph)
library(ggraph)
g <- sample_gnp(10,0.4)
ggraph(g,layout = "focus",v = 1)+
  draw_circle(use = "focus", max.circle = max(distances(g,1)))+
  geom_edge_link()+
  geom_node_point(shape = 21,fill = "grey25",size = 5)+
  theme_graph()+
  coord_fixed()
# }

Run the code above in your browser using DataLab