Class for managing layout algorithms and computing node positions.
Methods
Method new()
Create a new CographLayout object.
Usage
CographLayout$new(type = "circle", ...)Arguments
typeLayout name. One of the names returned by
list_layouts(), or"custom"together with acoordsargument....Additional parameters stored and passed to the layout function.
Method compute()
Compute layout coordinates for a network.
Method normalize_coords()
Rescale coordinates into the unit square. Both axes are
scaled by the same factor, so the larger spread spans
[padding, 1 - padding] and the layout is centered at 0.5.
Method print()
Print layout summary.
Examples
layout <- CographLayout$new("circle")
layout$compute(CographNetwork$new(regulation_net))
#> x y
#> 1 0.7351141 0.8236068
#> 2 0.8804226 0.6236068
#> 3 0.8804226 0.3763932
#> 4 0.7351141 0.1763932
#> 5 0.5000000 0.1000000
#> 6 0.2648859 0.1763932
#> 7 0.1195774 0.3763932
#> 8 0.1195774 0.6236068
#> 9 0.2648859 0.8236068
#> 10 0.5000000 0.9000000
