Learn R Programming

RCy3 (version 1.2.0)

layoutNetwork: layoutNetwork

Description

Layout the current graph according to the specified algorithm.

Usage

layoutNetwork(obj, layout.name='grid')

Arguments

obj
a CytoscapeWindowClass object.
layout.name
a string, one of the values returned by getLayoutNames, 'grid' by default.

Value

Nothing.

See Also

getLayoutNameMapping getLayoutNames restoreLayout saveLayout

Examples

Run this code
  # first, delete existing windows to save memory:
  deleteAllWindows(CytoscapeConnection())

  cw <- CytoscapeWindow ('layout.test', graph=makeSimpleGraph())
  displayGraph (cw)
  possible.layout.names <- getLayoutNames(cw)
  # choose one of the layouts e.g.:
  layoutNetwork (cw, possible.layout.names[1])
  # or:
  layoutNetwork (cw, 'force-directed')

Run the code above in your browser using DataLab