plot.net_edge_betweenness: Plot edge-betweenness scores

View source: R/centrality_measures.R

plot.net_edge_betweennessR Documentation

Plot edge-betweenness scores

Description

Draws the edges of a net_edge_betweenness network ranked by their betweenness, as a horizontal bar chart. This is the tidy, cograph-free companion to the node-link diagram: render the diagram with cograph::splot(eb) and the ranking with plot(eb).

Usage

## S3 method for class 'net_edge_betweenness'
plot(x, style = c("bar", "forest", "delta"), top_n = NULL, labels = TRUE, ...)

Arguments

x

A net_edge_betweenness network from net_edge_betweenness.

style

Plot style. "bar" (default) draws one horizontal bar per edge; "forest" draws a forest/lollipop chart (a stem from zero to a point) with a dashed reference line at the mean betweenness; "delta" draws each edge's deviation from the mean edge betweenness as a diverging bar (above the mean in blue, below in red).

top_n

Integer or NULL. Keep only the top_n highest edges. Default NULL (all edges with non-zero betweenness).

labels

Logical. Print the betweenness value beside each edge. Default TRUE.

...

Additional arguments (ignored).

Value

A ggplot object.

Examples

seqs <- data.frame(
  V1 = c("A","B","A","C"), V2 = c("B","C","B","A"),
  V3 = c("C","A","C","B"))
eb <- net_edge_betweenness(build_network(seqs, method = "relative"))
plot(eb)
plot(eb, style = "forest")
plot(eb, style = "delta")

Nestimate documentation built on July 11, 2026, 1:09 a.m.