Learn R Programming

RCy3 (version 1.2.0)

restoreLayout: restoreLayout

Description

Restore the current layout (that is, node positions) from the information saved in the supplied filename.

Usage

restoreLayout(obj, filename)

Arguments

obj
a CytoscapeWindowClass object.
filename
a string

Value

Nothing.

See Also

saveLayout

Examples

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

  cw <- CytoscapeWindow ('restoreLayout.test', graph=makeSimpleGraph())
  displayGraph (cw)
  layoutNetwork(cw, 'force-directed')
  saveLayout (cw, 'layout.RData')
  layoutNetwork(cw, 'isom')
  restoreLayout (cw, 'layout.RData')
  # you might need to adjust the zoom

Run the code above in your browser using DataLab