fruchterman_reingold#

fruchterman_reingold(graph, iterations=100, scale=1.0, node_start_size=1.0, cooloff_factor=0.95, dt=0.1)#

Fruchterman Reingold layout algorithm

Parameters:
  • graph (GraphView) – the graph view

  • iterations (int | None) – the number of iterations to run. Defaults to 100.

  • scale (float | None) – the scale to apply. Defaults to 1.0.

  • node_start_size (float | None) – the start node size to assign random positions. Defaults to 1.0.

  • cooloff_factor (float | None) – the cool off factor for the algorithm. Defaults to 0.95.

  • dt (float | None) – the time increment between iterations. Defaults to 0.1.

Returns:

A mapping from nodes to their [x, y] positions

Return type:

NodeLayout