Entering edit mode
Claudio Lottaz
▴
40
@claudio-lottaz-2756
Last seen 8.2 years ago
Dear Rgraphviz-experts,
I am trying to adjust the fontsize of graph nodes in a plot produced
by the Rgraphviz package. However, any fontsize related changes I make
don't have an effect when I plot the graph. For example code 1 below
generates a random graph with 4 nodes. In order to make the fontsize
of the graph nodes smaller than normal, I tried to adjust the attrs
variable as shown in code 2, but after plotting the graph I still
notice no change in terms of fontsize. All other node attributes work
except for fontsize. I don't know if this is expected in general or I
made a mistake.
Many thanks for any help!
Cheers,
Claudio
code1:
library("Rgraphviz")
set.seed(123)
V <- LETTERS[1:4]
M <- 1:4
g1 <- randomGraph(V, M, 0.2)
plot(g1)
code2:
globA=list(node=list(fontsize="6"),edge=list(minlen="3"))
plot(g1,attrs=globA)