I'm having trouble figuring out how to change the font family of node labels in geom_net. Here's a toy network graph:
library(geomnet)
net <- data.frame(from = sample(LETTERS, 20, replace=TRUE),
to = sample(LETTERS, 20, replace=TRUE),
weight = round(runif(20,1,5)))
ggplot(data = net, aes(from_id = from, to_id = to)) +
geom_net(aes(linewidth = weight), layout.alg = "kamadakawai",
labelon = TRUE, ecolour = "grey60",
directed = FALSE, fontsize = 6, ealpha = 0.5,
repel = TRUE)
There is a "base_family" parameter in theme_net, but that only seems to change the font family of the legend text (and not the node label text):
+ theme_net(base_family="Times")
I've also tried setting it in the theme function (which is how I usually set it in ggplot), but that also only changes the axis/legend text (and not the node label text):
+ theme(text=element_text(family="Times"))