Learn R Programming

RCy3 (version 1.2.0)

setVisualStyle: setVisualStyle

Description

Cytoscape provides a number of canned visual styles. You can also create your own. Use this method to establish an (already-defined) visual style as the style which governs the display of a network in the specified CytoscapeWindow object.

Usage

setVisualStyle(obj, new.style.name)

Arguments

obj
a CytoscapeWindowClass object.
new.style.name
a character string specifying the name of an existing style you wish to use.

Value

Nothing.

See Also

getVisualStyleNames copyVisualStyle

Examples

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

  window.name <- 'demo.setVisualStyle'
  cw <- CytoscapeWindow (window.name, graph=makeSimpleGraph ())
  displayGraph (cw)
  layoutNetwork(cw)

  styles <- getVisualStyleNames (cw)
  setVisualStyle (cw, styles[5])

Run the code above in your browser using DataLab