Skip to contents

[Deprecated]

layout.graphopt() was renamed to layout_with_graphopt() to create a more consistent API.

Usage

layout.graphopt(
  graph,
  start = NULL,
  niter = 500,
  charge = 0.001,
  mass = 30,
  spring.length = 0,
  spring.constant = 1,
  max.sa.movement = 5
)

Arguments

graph

The input graph.

start

If given, then it should be a matrix with two columns and one line for each vertex. This matrix will be used as starting positions for the algorithm. If not given, then a random starting matrix is used.

charge

The charge of the vertices, used to calculate electric repulsion. The default is 0.001.

mass

The mass of the vertices, used for the spring forces. The default is 30.