Description Usage Arguments Value Author(s) See Also Examples
Specify how data attributes – for the specified named attribute – is mapped to edge color.
1 | setEdgeColorRule(obj, edge.attribute.name, control.points, colors, mode, default.color='#FFFFFF')
|
obj |
a |
edge.attribute.name |
the edge attribute whose values will, when this rule is applied, determine the color of each edge. |
control.points |
a list of values, either numeric (for interpolate mode) or character strings (for 'lookup' mode). |
colors |
a list of colors, expressed as hexadecimal RGB, like this: '#FF0000' or '#FA8800' |
mode |
either 'interpolate' or 'lookup'. |
default.color |
a |
None.
Paul Shannon
setEdgeLineStyleRule setNodeColorRule
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | cw <- new.CytoscapeWindow ('setEdgeColorRule.test', graph=makeSimpleGraph())
edgeType.values = c ('phosphorylates', 'synthetic lethal', 'undefined')
colors = c ('#FF0000', '#FFFF00', '#00FF00')
setEdgeColorRule (cw, 'edgeType', edgeType.values, colors, mode='lookup')
score.values = c (-15, 0, 40);
colors = c ('#00FF00', '#FFFFFF', '#FF0000')
setEdgeColorRule (cw, 'score', score.values, colors, mode='interpolate')
# now swap the colors around
# now swap the colors
colors = c ('#FF0000', '#FFFFFF', '#00FF00')
setEdgeColorRule (cw, 'score', score.values, colors, mode='interpolate')
redraw (cw)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.