[R] Rgraphviz: Setting the edge width

From: Søren Højsgaard <Soren.Hojsgaard_at_agrsci.dk>
Date: Fri 07 Jul 2006 - 09:42:35 EST


I create an undirected graph with Rgraphviz (see code below). I would like to make the edges thicker. Can anyone help on this?? Regards
Søren    

   V <- c("A","B","C","D")
   E <- list(c("A","B"),c("B","C"),c("C","D"),c("D","A"),c("A","C"))    Eidx <- lapply(E, match, V)
   edL <- vector("list", length=length(V))    names(edL) <- V
   for (i in 1:length(Eidx)){

     tmp <- Eidx[[i]]
     print(tmp)
     edL[[tmp[1]]]$edges <- c(edL[[tmp[1]]]$edges, tmp[2])
     edL[[tmp[2]]]$edges <- c(edL[[tmp[2]]]$edges, tmp[1])
   }
   G <- new("graphNEL", nodes=V, edgeL=edL)    nAttrs <- list()
   nAttrs$fillcolor <- c("red","red","blue","blue")    names(nAttrs$fillcolor) <- V
   eAttrs <- list(color = c("A~B" = "green", "B~C" = "green", "C~D" = "yellow",

      "A~C" = "yellow"))
   plot(G, "neato", nodeAttrs = nAttrs, edgeAttrs = eAttrs)



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jul 07 09:47:07 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 14 Jul 2006 - 02:14:09 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.