Question: nodeRenderInfo fill property not working with graph/Rgraphviz
0
gravatar for Cristobal Fresno Rodríguez
6.9 years ago by
Argentina/Cordoba/Universidad Católica de Córdoba (CONICET)
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]]
graph rgraphviz • 720 views
ADD COMMENTlink modified 6.9 years ago by Kasper Daniel Hansen6.4k • written 6.9 years ago by Cristobal Fresno Rodríguez360
Answer: nodeRenderInfo fill property not working with graph/Rgraphviz
0
gravatar for Kasper Daniel Hansen
6.9 years ago by
United States
Kasper Daniel Hansen6.4k wrote:
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
ADD COMMENTlink written 6.9 years ago by Kasper Daniel Hansen6.4k
Hi Kasper, Thanks for the workaround. Best regards, Cristobal 2012/11/13 Kasper Daniel Hansen <kasperdanielhansen@gmail.com> > 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@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@r-project.org > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD REPLYlink written 6.9 years ago by Cristobal Fresno Rodríguez360
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 400 users visited in the last hour