Useful visualizations using lucy

#devtools::install_github("robertness/lucy")
library(lucy)
set.seed(20)

Graphviz + igraph

The Rgraphviz package makes very useful layouts for graphs. A basic Rgraphviz visualization is implemented in the igraphviz function.

igraphviz(ba.game(10))

Rgraphviz is especially useful in the case when there is a hierarchy between graph vertices that can be illustrated with a top-down ordering in the layout. For example, lucy's layerDAGs function stacks layers of highly-connected directed acyclic graphs on top of one another.

g <- layer_DAGs(6, 3)
igraphviz(g)

The plot_path function takes advantage of this hierarchy visualization technique by coloring all edges lying on paths from an upstream vertex to a downstream vertex. You can clearly see flow along the paths from top to bottom.

plot_path(g, 6, 13)


robertness/lucy documentation built on May 27, 2019, 10:32 a.m.