Description Usage Arguments Value Author(s) See Also Examples
Specify how data attributes – for the specified named attribute – is mapped to edge opacity.
1 | setEdgeOpacityRule(obj, edge.attribute.name, control.points, opacities, mode)
|
obj |
a |
edge.attribute.name |
the edge attribute whose values will, when this rule is applied, determine the opacity of each edge. |
control.points |
a list of values, either numeric (for interpolate mode) or character strings (for 'lookup' mode). |
opacities |
a list of opacity values, integers between 0 (invisible) and 255 (completely visible) |
mode |
either 'interpolate' or 'lookup'. |
None.
Paul Shannon
setEdgeLineStyleRule setEdgeColorRule
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | cw <- new.CytoscapeWindow ('setEdgeOpacityRule.test', graph=makeSimpleGraph())
displayGraph (cw)
layoutNetwork (cw, 'jgraph-spring')
edgeType.values <- c ("phosphorylates", "synthetic lethal", "undefined")
# want to see edges and both arrows, to check success of opacity rule
setEdgeTargetArrowRule (cw, 'edgeType', edgeType.values, rep ('ARROW', 3))
setEdgeSourceArrowRule (cw, 'edgeType', edgeType.values, rep ('ARROW', 3))
setDefaultEdgeLineWidth (cw, 5)
redraw (cw)
# do the lookup rule
opacities <- c (25, 100, 255)
setEdgeOpacityRule (cw, 'edgeType', edgeType.values, opacities, mode='lookup')
redraw (cw)
# now do the interpolated version
opacities <- c (10, 125, 255)
control.points <- c (-12, 0, 35)
setEdgeOpacityRule (cw, 'score', control.points, opacities, mode='interpolate')
redraw (cw)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.