annotate concentric circles
Details
this function is best used with layout_with_centrality together with draw_circle.
Examples
library(igraph)
#>
#> Attaching package: ‘igraph’
#> The following objects are masked from ‘package:stats’:
#>
#> decompose, spectrum
#> The following object is masked from ‘package:base’:
#>
#> union
g <- sample_gnp(10, 0.4)
if (FALSE) { # \dontrun{
library(ggraph)
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()
} # }