CartesianLayout: Cartesian layout

Description Usage Arguments Details Value See Also Examples

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## 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 Oct. 26, 2021, 1:33 a.m.