CartesianLayout | R Documentation |
This function creates a cartesian layout aspect, that stores coordinates of nodes.
createCartesianLayout(node, x, y, z = NULL, view = NULL)
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 ( |
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.
CartesianLayoutAspect object
updateCartesianLayout
;
## 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) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.