Entering edit mode
hettling
▴
60
@hettling-5170
Last seen 10.3 years ago
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