Robert Gentleman wrote:
> 
> Hi Ben,
>    Sorry for the slow reply, but something like this works,
> 
>   [...]
> 


  Sorry not to have responded sooner.  I had actually
worked it out for myself (after finding another e-mail
exchange on the Bioconductor list that indicated the
problem had been solved).

 This is a fragment of a larger piece of code, 
but here's what I did to make the line widths
proportional to sqrt(edge weight):

en = edgeNames(gr2)
lw = sqrt(unlist(edgeWeights(gr2)))
en2 = gsub("~",".",en)
lw2 = lw[en2]

names(lw2) = en
eAttrs <- list(lwd=lw2)
## sublists and node attributes defined earlier ...
plot(gr2,subGList=sglist2,nodeAttrs=nAttrs,edgeAttrs=eAttrs,"neato")

    thanks for such useful tools!

 sincerely
    Ben Bolker

-- 
View this message in context: 
http://www.nabble.com/linewidth-in-Rgraphviz-tf4565412.html#a13098418
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.

Reply via email to