setEdgeSourceArrowShapeDirect: setEdgeSourceArrowShapeDirect

Description Usage Arguments Value Author(s) See Also Examples

Description

In the specified CytoscapeWindow, set the source arrow shape of the specified edge or edges, using one of the supported shapes.

Usage

1
setEdgeSourceArrowShapeDirect(obj, edge.names, new.values)

Arguments

obj

a CytoscapeWindowClass object.

edge.names

one or more cy2-style edge names, String objects.

new.values

one or more String objects, from the supported set.

Value

None.

Author(s)

Paul Shannon

See Also

cy2.edge.names getArrowShapes setEdgeTargetArrowRule setEdgeSourceArrowShapeDirect

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  cw <- new.CytoscapeWindow ('setEdgeSourceArrowShapeDirect.test', graph=makeSimpleGraph())
  displayGraph (cw)
  layoutNetwork(cw, 'jgraph-spring')
  redraw (cw)

  edges.of.interest = as.character (cy2.edge.names (cw@graph))
  supported.arrow.shapes = getArrowShapes (cw)

    # first try passing three edges and three arrow shapes
  setEdgeSourceArrowShapeDirect (cw, edges.of.interest, supported.arrow.shapes [2:5])
  redraw (cw)

  Sys.sleep (1)
  
    # now try passing three edges and one arrow.shapes
  setEdgeSourceArrowShapeDirect (cw, edges.of.interest, supported.arrow.shapes [6])
  redraw (cw)

    # now loop through all of the arrow.shapes

  for (shape in supported.arrow.shapes) {
    setEdgeSourceArrowShapeDirect (cw, edges.of.interest, shape)
    Sys.sleep (1)
    redraw (cw)
    }


    # restore the default
  setEdgeSourceArrowShapeDirect (cw, edges.of.interest, 'No Arrow')
  redraw (cw)

RCytoscape documentation built on Nov. 17, 2017, 10:52 a.m.