layoutSelectionInGridInferAnchor,RCyjs-method {RCyjs} | R Documentation

## layoutSelectionInGridInferAnchor

### Description

`layoutSelectionInGridInferAnchor` the top-most, left-most of the selected nodes is the anchor

### Usage

    ## S4 method for signature 'RCyjs'
    layoutSelectionInGridInferAnchor(obj, w, h)

### Arguments

`obj` | an RCyjs instance
`w` | numeric, the width of the grid box
`h` | numeric, the height of the grid box

### Details

anchor (the top left) of the grid is the location of the topmost/leftmost node, then arrange all the selected nodes in a box anchored here.

### Value

explain what the method returns

### Examples

    if(interactive()){
       g <- simpleDemoGraph()
       rcy <- RCyjs(title="rcyjs demo", graph=g)
       layout(rcy, "cose")
       fit(rcy, 100)
       loadStyleFile(rcy, system.file(package="RCyjs", "extdata", "sampleStyle2.js"));
       selectNodes(rcy, nodes(g))
       layoutSelectionInGrid(rcy, -1000, 10, 100, 400)
       }

[Package RCyjs version 2.12.0 Index]