nodeRenderInfo fill property not working with graph/Rgraphviz
1
0
Entering edit mode
@cristobal-fresno-rodriguez-3838
Last seen 8.6 years ago
Argentina/Cordoba/Universidad Católica …
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 graph Rgraphviz • 1.8k views
ADD COMMENT
0
Entering edit mode
@kasper-daniel-hansen-2979
Last seen 18 months ago
United States
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 COMMENT
0
Entering edit mode
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 REPLY

Login before adding your answer.

Traffic: 880 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