Learn R Programming

graphlayouts (version 1.2.2)

graph_manipulate: Manipulate graph

Description

functions to manipulate a graph

Usage

reorder_edges(g, attr, desc = TRUE)

Value

manipulated graph

Arguments

g

igraph object

attr

edge attribute name used to sort edges

desc

logical. sort in descending (default) or ascending order

Author

David Schoch

Details

reorder_edges() allows to reorder edges according to an attribute so that edges are drawn in the given order.

Examples

Run this code
library(igraph)

g <- sample_gnp(10, 0.5)
E(g)$attr <- 1:ecount(g)
gn <- reorder_edges(g,"attr")

Run the code above in your browser using DataLab