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

1
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.

Author(s)

Paul Shannon

See Also

getVisualStyleNames copyVisualStyle

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  window.name = 'demo.setVisualStyle'
  cw = new.CytoscapeWindow (window.name, graph=makeSimpleGraph ())
  displayGraph (cw)
  redraw (cw)
  layoutNetwork(cw)

  styles = getVisualStyleNames (cw)
   # now cycle through the currently defined styles
  for (style in styles) {
    print (paste ("about to set new style:", style))
    setVisualStyle (cw, style)
    }

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.