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