First, I noticed that you mentioned interact_plot
in jtools
. The documentation there says that this function has been deprecated and moved to package interactions
(which I also edited into your question). Looking at the source code on GitHub it shows that the final object is a ggplot
object. Which is great, because you can modify "theme" of this object after it is plotted. You modify the theme and replot it et voila.
Since I'm on Windows and needed tips on how to modify font to TNY, I found this post. Some of the examples in interact_plot
didn't work for me, but I did manage to modify the one that did.
library(interactions)
library(extrafont)
loadfonts(device = "win")
fit <- lm(Income ~ HSGrad * Murder * Illiteracy, data = states)
xy <- interact_plot(model = fit, pred = Murder, modx = Illiteracy, mod2 = HSGrad)
xy + theme(axis.title = element_text(family = "serif"),
legend.text = element_text(family = "serif"),
legend.title = element_text(family = "serif"),
strip.text = element_text(family = "serif"))
