# first, delete existing windows to save memory:
deleteAllWindows(CytoscapeConnection())
cw <- CytoscapeWindow ('layout.test', graph=makeSimpleGraph())
displayGraph (cw)
possible.layout.names <- getLayoutNames(cw)
# choose one of the layouts e.g.:
layoutNetwork (cw, possible.layout.names[1])
# or:
layoutNetwork (cw, 'force-directed')
Run the code above in your browser using DataLab