[BioC] fontsize in Rgraphviz

Deepayan Sarkar deepayan.sarkar at gmail.com
Tue Jan 29 22:47:42 CET 2008


On 1/25/08, Mark W Kimpel <mwkimpel at gmail.com> wrote:
> I would like to vary the font size of node labels in Rgraphviz as I have
> been varying node size by fold change magnitude. Unfortunately, many
> attempts have failed and I continue to get the same font size. Here is
> my code followed by sessionInfo()
>
> nAttrs$fontsize<-floor(22 * nodeWidth)
>
> nodeWidth is a vector of widths which vary by node according to fold
> change. This works nicely, but font size does not.

We have been playing an alternative rendering interface. With
bioc-devel, I get varying node sizes and label size using


set.seed(123)
V <- letters[1:10]
M <- 1:4
g1 <- randomGraph(V, M, .2)

cex.list <- runif(length(nodes(g1)))
names(cex.list) <- nodes(g1)

width.list <- seq(0.2, 2, length = length(nodes(g1)))
names(width.list) <- nodes(g1)

x <- layoutGraph(g1, nodeAttrs = list(width = width.list))
nodeRenderInfo(x) = list(fontsize = 50 * cex.list)
renderGraph(x)



I'm not sure if this will work with Bioc 2.1.

-Deepayan



More information about the Bioconductor mailing list