The DrL graph layout generator
DrL is a force-directed graph layout toolbox focused on real-world large-scale graphs, developed by Shawn Martin and colleagues at Sandia National Laboratories.
layout.drl (graph, use.seed = FALSE, seed = matrix(runif(vcount(graph) * 2), nc = 2), options = igraph.drl.default, weights = E(graph)$weight, fixed = NULL, dim = 2)
- The input graph, in can be directed or undirected.
- Logical scalar, whether to use the coordinates given
seedargument as a starting point.
- A matrix with two columns, the starting coordinates for
the vertices is
TRUE. It is ignored otherwise.
- Options for the layout generator, a named list. See details below.
- Optional edge weights. Supply
NULLhere if you want to weight edges equally. By default the
weightedge attribute is used if the graph has one.
- Logical vector, it can be used to fix some vertices. All
vertices for which it is
TRUEare kept at the coordinates supplied in the
seedmatrix. It is ignored it
2or 3, it specifies whether we want a two dimensional or a three dimensional layout. Note that because of the nature of the DrL algorithm, the three dimensional layout takes significantly longer to com
This function implements the force-directed DrL layout generator.
The generator has the following parameters:
There are five pre-defined parameter settings as well, these are
- A numeric matrix with two columns.
layout for other layout generators.
g <- as.undirected(ba.game(100, m=1)) l <- layout.drl(g, options=list(simmer.attraction=0)) plot(g, layout=l, vertex.size=3, vertex.label=NA)