CartesianLayout: Cartesian layout

CartesianLayoutR Documentation

Cartesian layout

Description

This function creates a cartesian layout aspect, that stores coordinates of nodes.

Usage

createCartesianLayout(node, x, y, z = NULL, view = NULL)

Arguments

node

integer; reference to node ids

x

numeric; x coordinate

y

numeric; y coordinate

z

numeric (optional); z coordinate

view

integer (optional); reference to subnetwork id of type view (CyNetworkRelations)

Details

The layout of networks can be influenced by setting the node position manually. While x an y coordinates are mandatory, the z coordinates are optional and can, for example, be used to define the vertical stacking order of overlapping nodes.

Similar to Cytoscape https://cytoscape.org/, it is possible to define different views of the same network. The views itself are definded in CySubNetworks and CyNetworkRelations, and only referenced by a unique subnetwork id.

Value

CartesianLayoutAspect object

See Also

updateCartesianLayout;

Examples

## a minimal example
cartesianLayout = createCartesianLayout(
  node=0,
  x=5.5, 
  y=200.3
)

## defining several coordinates at once
cartesianLayout = createCartesianLayout(
  node=c(0, 1),
  x=c(5.5, 110.1), 
  y=c(200.3, 210.2)
)

## with all parameters
cartesianLayout = createCartesianLayout(
  node=c(0, 1, 0),
  x=c(5.5, 110.1, 7.2), 
  y=c(200.3, 210.2, 13.9),
  z=c(-1, 3.1, NA),
  view=c(NA, NA, 1476)
)

frankkramer-lab/RCX documentation built on Feb. 4, 2023, 5:12 p.m.