g1_gz <- gzfile(system.file("GXL/graphExample-01.gxl.gz",
package="graph"))
if(require(XML)) {
g1 <- fromGXL(g1_gz)
ag <- agopen(g1, name="test")
toFile(ag, layoutType="dot", filename="g1_dot.svg", fileType="svg")
toFile(ag, layoutType="neato", filename="g1_neato.ps", fileType="ps")
toFile(ag, layoutType="twopi", filename="g1_twopi.svg", fileType="svg")
}
Run the code above in your browser using DataLab