Rgraphviz: Setting the edge width
2
0
Entering edit mode
@sren-hjsgaard-1792
Last seen 10.3 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20060707/ 6e7da722/attachment.pl
• 935 views
ADD COMMENT
0
Entering edit mode
@lilongisb-sibch-1725
Last seen 10.3 years ago
"neato" allows you to set several edge attributes, a close one to what you want is "style", which could be solid/bold/dotted/dashed. It seems that currently only "solid" works well. Li > 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) > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT
0
Entering edit mode
Seth Falcon ★ 7.4k
@seth-falcon-992
Last seen 10.3 years ago
Hi S?ren, S?ren H?jsgaard <soren.hojsgaard at="" agrsci.dk=""> writes: > I create an undirected graph with Rgraphviz (see code below). I > would like to make the edges thicker. Can anyone help on this?? I don't think there is any easy way to achieve this in the current released verison of Rgraphviz. However, in the devel version, code has been added to allow specifying lwd (width) and lty (type) for the edges. To use this feature, one needs to add lwd and/or lty members to the edge attributes list (your eAttrs below). + seth
ADD COMMENT

Login before adding your answer.

Traffic: 1386 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6