draw_circle: Draw concentric circles

Description Usage Arguments Details Value Examples

View source: R/annotate_functions.R

Description

Draw concentric circles

Usage

1
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

Details

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

Value

concentric circles around origin

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(igraph)
library(ggraph)
g <- sample_gnp(10,0.4)

## Not run: 
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)

schochastics/graphlayouts documentation built on March 14, 2020, midnight