addEdgesToPlot: Highlight edges in graph.

Description Usage Arguments Value Examples

View source: R/plot.R

Description

Highlights edges in coordinate plot.

Usage

1
addEdgesToPlot(x, g, edge.list, ...)

Arguments

x

[ggplot]
Coordinate plot generated via plot.grapherator.

g

[grapherator]
Graph.

edge.list

[matrix]
Matrix of edges (each column is one edge).

...

[any]
Arguments passed down to geom_segment.

Value

[ggplot] Modified x.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
g = graph(0, 100)
g = addNodes(g, n = 10, generator = addNodesUniform)
g = addEdges(g, generator = addEdgesComplete)
pl = plot(g)$pl.coords
el = matrix(c(1, 2, 1, 3, 4, 5, 3, 4), nrow = 2L)
pl = addEdgesToPlot(pl, g, el)
print(pl)

## End(Not run)

jakobbossek/grapherator documentation built on Oct. 4, 2021, 11:03 a.m.