[BioC] nodeRenderInfo fill property not working with graph/Rgraphviz

Kasper Daniel Hansen kasperdanielhansen at gmail.com
Tue Nov 13 15:44:26 CET 2012


Hi Christobal

Thanks for the bug report.  I will see if I can fix this later this week.

But for now, I can help by saying that it will work if you set the
'attribute' on the graph after layout.  Like

la <- layoutGraph(g)
nodeRenderInfo(la) <- list(fill=c("a"="red", "b"="green"))
renderGraph(la)

This may be true for other 'attributes' as well.

As an aside, there are clearly things that need to change in the
entire layout/rendering process, and it is on my todo list to overhaul
this system to something more streamlined.  It is not really ideal
that we have two different plotting systems (layoutGraph + renderGraph
vs graphLayout + plot).

Kasper

On Tue, Nov 13, 2012 at 9:06 AM, Cristobal Fresno Rodríguez
<cristobalfresno at gmail.com> wrote:
> library(graph)
> library(Rgraphviz)
>
> g <- randomGraph(letters[1:4], 1:3, p=0.8)
> nodeRenderInfo(g) <- list(fill=c("a"="red", "b"="green"))
> renderGraph(layoutGraph(g))
>
> Rgraphviz_2.2.1 graph_1.36.1
>
> Dear list,
>
> I have upgraded Rgraphviz and graph package but, I cannot make fill
> property of nodeRenderInfo get to work as in previous versions. In addition
> the example on nodeRenderInfo does not work too.
>
> library(graph)
> library(Rgraphviz)
>
> g <- randomGraph(letters[1:4], 1:3, p=0.8)
> nodeRenderInfo(g) <- list(fill=c("a"="red", "b"="green"))
> renderGraph(layoutGraph(g))
> plot(g)
>
> The plotted graph using renderGraph or plot function should have a and b
> node in red and green respectively. Instead they both are plotted in white
> fill color.
> I would appreciate any help.
> Thanks,
>
> Kachelo
>
> sessionInfo()
> R version 2.15.1 (2012-06-22)
> Platform: i686-pc-linux-gnu (32-bit)
>
> locale:
>  [1] LC_CTYPE=es_AR.UTF-8       LC_NUMERIC=C
>  [3] LC_TIME=es_AR.UTF-8        LC_COLLATE=es_AR.UTF-8
>  [5] LC_MONETARY=es_AR.UTF-8    LC_MESSAGES=es_AR.UTF-8
>  [7] LC_PAPER=C                 LC_NAME=C
>  [9] LC_ADDRESS=C               LC_TELEPHONE=C
> [11] LC_MEASUREMENT=es_AR.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] grid      stats     graphics  grDevices utils     datasets  methods
> [8] base
>
> other attached packages:
> [1] Rgraphviz_2.2.1 graph_1.36.1
>
> loaded via a namespace (and not attached):
> [1] BiocGenerics_0.4.0 stats4_2.15.1      tools_2.15.1
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> 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