window.name = 'demo.setVisualStyle'
cw = new.CytoscapeWindow (window.name, graph=makeSimpleGraph ())
displayGraph (cw)
redraw (cw)
layoutNetwork(cw)
styles = getVisualStyleNames (cw)
# now cycle through the currently defined styles
for (style in styles) {
print (paste ("about to set new style:", style))
setVisualStyle (cw, style)
}
Run the code above in your browser using DataLab