Learn R Programming

RCytoscape (version 1.22.0)

setZoom: setZoom

Description

This method expands or contracts the relative size of the objects (the graph) displayed in the CytoscapeWindow. A value of 1.0 typically renders the graph with an ample margin. A call to fitContent produces a zoom level of about 1.5.

Usage

setZoom(obj, new.level)

Arguments

obj
a CytoscapeWindowClass object.
new.level
a numeric object.

Value

None.

See Also

getZoom getCenter setCenter getViewCoordinates fitContent

Examples

Run this code
  window.title = 'setZoom demo'
  cw <- new.CytoscapeWindow (window.title, graph=makeSimpleGraph())
  displayGraph (cw)
  redraw (cw)
  layoutNetwork(cw, 'jgraph-spring')
  setZoom (cw, 0.3)
  system ('sleep 1')
  setZoom (cw, 3.0)
  system ('sleep 1')
  setZoom (cw, 1.0)

Run the code above in your browser using DataLab