# first, delete existing windows to save memory:
deleteAllWindows(CytoscapeConnection())
window.title = 'getCenter demo'
cw <- CytoscapeWindow (window.title, graph=makeSimpleGraph())
displayGraph (cw)
redraw (cw)
layoutNetwork(cw, 'force-directed')
print (getCenter (cw))
Run the code above in your browser using DataLab