g6_layout {g6R}R Documentation

Set the layout algorithm for a g6 graph

Description

This function configures the layout algorithm used to position nodes in a g6 graph.

Usage

g6_layout(graph, layout = d3_force_layout())

Arguments

graph

A g6 graph object created with g6().

layout

An existing layout function like circular_layout or a string like circular-layout. At minimum, this can be a list that should contain a type element specifying the layout algorithm. Additional parameters depend on the layout type chosen, for instance list(type = "force").

Details

G6 provides several layout algorithms, each suitable for different graph structures:

Each layout algorithm has specific configuration options. See the G6 documentation for detailed information on each layout and its parameters: https://g6.antv.antgroup.com/en/manual/layout/overview.

Value

The modified g6 graph object with the specified layout, allowing for method chaining.

See Also

g6()


[Package g6R version 0.1.0 Index]