Description Usage Arguments Value See Also Examples
setPosition
of nodes by their id
1 2 | ## S4 method for signature 'RCyjs'
setPosition(obj, tbl.pos)
|
obj |
an RCyjs instance |
tbl.pos |
a data.frame with three columns: id, x, y |
no return value
1 2 3 4 5 6 7 8 9 | if(interactive()){
g <- simpleDemoGraph()
rcy <- RCyjs(title="getPosition", graph=g)
layout(rcy, "cose")
tbl.pos <- getPosition(rcy)
# shift all the nodes to the right
tbl.pos$x <- tbl.pos$x + 50
setPosition(rcy, tbl.pos)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.