Skip to contents


layout.drl() was renamed to layout_with_drl() to create a more consistent API.


  use.seed = FALSE,
  seed = matrix(runif(vcount(graph) * 2), ncol = 2),
  options = drl_defaults$default,
  weights = NULL,
  dim = 2



The input graph, in can be directed or undirected.


Logical scalar, whether to use the coordinates given in the seed argument as a starting point.


A matrix with two columns, the starting coordinates for the vertices is use.seed is TRUE. It is ignored otherwise.


Options for the layout generator, a named list. See details below.


The weights of the edges. It must be a positive numeric vector, NULL or NA. If it is NULL and the input graph has a ‘weight’ edge attribute, then that attribute will be used. If NULL and no such attribute is present, then the edges will have equal weights. Set this to NA if the graph was a ‘weight’ edge attribute, but you don't want to use it for the layout. Larger edge weights correspond to stronger connections.


Either ‘2’ or ‘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 compute.