# first, delete existing windows to save memory:
deleteAllWindows(CytoscapeConnection())
cw <- CytoscapeWindow ('setEdgeSourceArrowShapeDirect.test', graph=makeSimpleGraph())
displayGraph (cw)
layoutNetwork (cw, 'force-directed')
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:4])
# now try passing three edges and one arrow.shapes
setEdgeSourceArrowShapeDirect (cw, edges.of.interest, supported.arrow.shapes [6])
# restore the default
setEdgeSourceArrowShapeDirect (cw, edges.of.interest, 'NONE')
Run the code above in your browser using DataLab