Description Usage Arguments Value Author(s) See Also Examples
Get the size of the specified nodes on the CytoscapeWindow canvas.
1 | getNodeSize(obj, node.names)
|
obj |
a |
node.names |
a |
A named list containing two equal-lengthed vectors, width and height. Unless node dimensions are 'unlocked' these two vectors will be identical.
Paul Shannon
setNodeSizeRule, setNodeSizeDirect, lockNodeDimensions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | cw <- new.CytoscapeWindow ('getNodeSize.test', graph=makeSimpleGraph())
displayGraph (cw)
layoutNetwork(cw)
sizes = getNodeSize (cw, c ('A', 'B', 'C'))
print (sizes$width)
print (sizes$height)
setNodeSizeDirect (cw, 'A', 180)
redraw (cw)
print (getNodeSize (cw, 'A'))
lockNodeDimensions (cw, FALSE)
setNodeWidthDirect (cw, 'A', 300)
setNodeHeightDirect (cw, 'A', 100)
redraw (cw)
sizes = getNodeSize (cw, 'A')
print (sizes$width)
print (sizes$height)
lockNodeDimensions (cw, TRUE)
setNodeSizeDirect (cw, 'A', 80)
redraw (cw)
print (getNodeSize (cw, 'A'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.