Skip to content

Layout igraph


Calculate layout, i.e. node positions, for a network.

Use igraph to create your own layout. Methods and possible parameters are described here.


The following are the step's expected inputs and outputs and their specific types.

Step signature
    targets: list[number],
    *weights: list[number], 
        "param": value
) -> (x: column, y: column)

where the object {"param": value} is optional in most cases and if present may contain any of the parameters described in the corresponding section below.


The following configuration would allow smaller clusters and consider fewer of the data points as noise:

Example call (in recipe editor)
layout(links) -> (ds.x, ds.y)


targets: column:list[number]

A column containing link targets. Source is implied in the index.

*weights: column:list[number]


x: column

A numerical column with the x position of the calculated layout.

y: column

A numerical column with the y position of the calculated layout.


This step also accepts extra parameters for the specific methods. See possible parameters in the method documentation here

method: string = "fr"

Algorithm to use. The name of a supported clustering algorithm (currently allows 'fr', 'fruchterman_reingold', 'drl', 'sugiyama').

Must be one of: "fr", "fruchterman_reingold", "drl", "sugiyama"

directed: boolean = False

Links directed. Are the links directed (true) or not (false).

seed: integer = 1

Seed. Seed to initialize the graph.