data(cca.example)
res1 <- cca(cca.example) # with igraph 0.7, this should find 3 classes of sizes 218 391 144.
plot(res1, 1) # plot the first module
plot(res1, 2) # plot the second module
plot(res1, 3) # plot the third module
plot(res1, 1, bw = TRUE) # check out first module in black and white
plot(res1, 1, LAYOUT = layout.fruchterman.reingold) # try a different layout algorithm
# example of saving a fixed layout
layout1 <- plot(res1, 1) # try out a layout ...
layout1 <- plot(res1, 1) # ... try again
layout1 <- plot(res1, 1) # ... until one looks good
# Now plot the result with the chosen layout. To save image to disk,
# replace NULL below with file name (e.g., file = "module1.pdf")
plot(res1, 1, LAYOUT = layout1, file = NULL)
Run the code above in your browser using DataLab