On 08/10/2007 8:27 PM, Dieter Best wrote: > Hello there, > > I am using the igraph package to build graphs from my data. If I plot a > graph though, it's not easy for me to see what's going on. Does anybody know > how to rearrange a graph to get a plot without too many crossing lines? Maybe > other packages?
Rgraphviz in Bioconductor does a great job of this. It's a wrapper for the Graphviz library, so the R docs are a little sparse, but there's a tremendous amount of flexibility there. For example, library(Rgraphviz) nodes <- c("R", "Scheme", "S", "APL", "Lisp", "Fortran", "Ratfor", "CLOS", "C", "Haskell") edges <- list(R=character(0), Scheme=c("R","Haskell"), S="R", APL=c("S", "Haskell"), Lisp=c("Scheme", "S", "CLOS","Haskell"), Fortran="Ratfor", Ratfor="S", CLOS="S", C=c("S","R","Ratfor"), Haskell="R") g <- new("graphNEL", nodes=nodes, edgeL=edges, edgemode="directed") plot(g) Duncan Murdoch ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.