[BioC] Rgraphviz: Setting the edge width

Li.Long at isb-sib.ch Li.Long at isb-sib.ch
Mon Jul 10 14:10:52 CEST 2006


"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



More information about the Bioconductor mailing list