[BioC] hyperdraw: How can I control node label font size?

hettling j.hettling at vu.nl
Wed May 8 13:33:24 CEST 2013


Hello,

thank you for the quick reply, the workaround that you suggested works
very well for me!

Kind Regards

Hannes


On Wed, 2013-05-08 at 09:43 +1200, Paul Murrell wrote:
> 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
> >
>



More information about the Bioconductor mailing list