Description Usage Arguments Value Author(s) References See Also Examples
Visualization of networks using hierarchical edge bundles referenced below. Plots a graph using a hierachical tree as guides for the edges.
1 2 3 4 |
phylo |
A |
graph |
A |
beta |
A number between 0 and 1 controlling the bundling strength. |
include.mrca |
Should the only the most recent common ancestor be used in the shortest path used for the splines? |
simplify |
Simplify the paths by taking the convex hull of the control points. Can sometimes yield better results. |
... |
Arguments passed to |
args.lines |
A list of arguments passed to |
args.points |
A list of arguments passed to |
debug |
Plot some extra debug info. |
e.cols |
A character vector giving the colors of the edges.
Overrides any use of |
v.use.only |
An integer vector giving the nodes from which edges are
to be drawn. E.g. |
e.use.only |
An integer vector giving the edges to be drawn.
E.g. |
Plots to a new device.
Anders Ellern Bilgrau <anders.ellern.bilgrau (at) gmail.com>
Holten, Danny. "Hierarchical edge bundles: Visualization of adjacency relations in hierarchical data." Visualization and Computer Graphics, IEEE Transactions on 12.5 (2006): 741-748.
See plot.phylo
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | library("igraph")
library("ape")
n <- 10
# Create a graph
corr <- cor(matrix(rnorm(n^2), n, n))
rownames(corr) <- colnames(corr) <-
apply(combn(LETTERS, 2), 2, paste0, collapse = "")[1:n]
adj <- abs(corr)
graph <- graph.adjacency(adj, mode = "un", weighted = TRUE, diag = FALSE)
E(graph)$color <- ifelse(get.lower.tri(corr) < 0, "blue", "red")
phylo <- as.phylo(hclust(as.dist(1 - adj), method = "ward.D"))
plotHierarchicalEdgeBundles(phylo, graph, type = "fan",
e.cols = E(graph)$color)
par(mfrow = c(1, 3), mar = c(0, 0, 0, 0))
plot(phylo, type = "fan")
plotHierarchicalEdgeBundles(phylo, graph, type = "fan", beta = 0.95,
args.lines = list(col = alp("steelblue", 90)))
plotHierarchicalEdgeBundles(phylo, graph, type = "fan", beta = 0.85,
args.lines = list(col = alp("steelblue", 90)))
# Extra control of plotting and debugging
par(mfrow = c(1,2))
plot(phylo, type = "unrooted")
plotHierarchicalEdgeBundles(phylo, graph, type = "unrooted", beta = 0.8,
v.use.only = 1, debug = FALSE,
args.lines = list(col = alp("red", 1), lwd = 2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.