[BioC] hyperdraw: How can I control node label font size?
Paul Murrell
paul at stat.auckland.ac.nz
Tue May 7 23:43:08 CEST 2013
Hi
This is a bug (or "missing feature") in 'hyperdraw'.
I will update the package with a fix, but in the meantime, does this
workaround do what you want ?
pushViewport(viewport(gp=gpar(cex=.5)))
plot(testrabph, newpage=FALSE)
Paul
On 05/07/13 21:39, hettling wrote:
> Hello,
>
> I am using the Hyperdraw package and am wondering how I can set the font
> size for the labels of my node?
>
> I took the example from the vignette:
>
> ##
> dh1 <- DirectedHyperedge("A", "B", "R1")
> dh2 <- DirectedHyperedge(c("A", "B"), c("C", "D"), "R2")
> dh3 <- DirectedHyperedge("D", "E", "R3")
> hg <- Hypergraph(LETTERS[1:5], list(dh1, dh2, dh3))
> testbph <- graphBPH(hg)
> testrabph <- graphLayout(testbph)
> nodeDataDefaults(testrabph, "shape") <- "plain"
> plot(testrabph)
> ##
>
> Here is what I tried:
>
> ##
> nodeDataDefaults(testrabph, "cex") <- 0.5
> ##
>
> the above seems to control the size of the labels for the edges, not the
> nodes A-E.
> Then I tried to set the font size manually for each node:
>
> ##
> for (i in seq_along(testrabph at graph@AgNode)){
> testrabph at graph@AgNode[[i]]@txtLabel at labelFontsize <- 2
> }
> ##
>
> but this did not work either.
>
> Does anyone know how I could set the font size in this example? Any help
> is appreciated,
>
> many thanks in advance,
>
> Hannes
>
> _______________________________________________
> 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
>
--
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
paul at stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/
More information about the Bioconductor
mailing list