# first, delete existing windows to save memory:
deleteAllWindows(CytoscapeConnection())
cw <- CytoscapeWindow ('setGraph.test') # an empty graph is created by default
graph <- makeSimpleGraph ()
setGraph (cw, graph)
displayGraph (cw)
layoutNetwork (cw, 'force-directed')
print (length (nodes (getGraph (cw))))
Run the code above in your browser using DataLab