setNodeLabelRule

Share:

Description

Specify the node attribute to be used as the label for each node. Non-character attributes are converted to strings before they are used as labels.

Usage

1
setNodeLabelRule(obj, node.attribute.name)

Arguments

obj

a CytoscapeWindowClass object.

node.attribute.name

the node attribute whose values will, when this rule is applied, determine the label on each node.

Value

None.

Author(s)

Paul Shannon

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  cw <- new.CytoscapeWindow ('setNodeLabelRule.test', graph=makeSimpleGraph())
  displayGraph (cw)
  layoutNetwork(cw, 'jgraph-spring')
  setNodeLabelRule (cw, 'label')
  redraw (cw)
  setNodeLabelRule (cw, 'type')
  redraw (cw)
  setNodeLabelRule (cw, 'lfc')
  redraw (cw)
  setNodeLabelRule (cw, 'count')
  redraw (cw)
  setNodeLabelRule (cw, 'label')
  redraw (cw)

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