Skip to contents

Configurational layouts locate nodes at symmetric coordinates to help illustrate particular configurations. Currently configurational layouts are available for 2-6 nodes. The "configuration" layout will choose the appropriate configurational layout automatically.

Usage

layout_configuration(.data, circular = TRUE, times = 1)

layout_tbl_graph_configuration(.data, circular = TRUE, times = 1)

layout_dyad(.data, circular = TRUE, times = 1)

layout_triad(.data, circular = TRUE, times = 1)

layout_tetrad(.data, circular = TRUE, times = 1)

layout_pentad(.data, circular = TRUE, times = 1)

layout_hexad(.data, circular = TRUE, times = 1)

Arguments

.data

Some {manynet} compatible network data.

circular

Should the layout be transformed into a radial representation. Only possible for some layouts. Defaults to FALSE. Required for {ggraph} compatibility.

times

Maximum number of iterations, where appropriate. Required for {ggraph} compatibility, and ignored by the layouts that do not iterate.

Value

Returns a table of nodes' x and y coordinates.

Examples

# "configuration" picks the layout matching the number of nodes
graphr(manynet::create_ring(4), layout = "configuration")

# the specific configurations are also available as functions
layout_tetrad(manynet::create_ring(4))
#>   x y
#> 1 0 0
#> 2 0 1
#> 3 1 0
#> 4 1 1