annotate_circle: annotate concentric circles

Description Usage Arguments Details Value Examples

View source: R/annotate_functions.R

Description

annotate concentric circles

Usage

1
annotate_circle(cent, col = "#00BFFF", format = "", pos = "top", text_size = 3)

Arguments

cent

centrality scores used for layout

col

color of text

format

either empty string or 'scientific'

pos

position of text ('top' or 'bottom')

text_size

font size for annotations

Details

this function is best used with layout_with_centrality together with draw_circle.

Value

annotated concentric circles around origin

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(igraph)
library(ggraph)

g <- sample_gnp(10,0.4)
## Not run: 
ggraph(g,layout = "centrality",centrality = closeness(g))+
 draw_circle(use = "cent")+
 annotate_circle(closeness(g),pos = "bottom",format = "scientific")+
 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