Change font family in interaction plot in R -


i using sjplot - package builds off ggplot2 new - , trying change font family times new roman. using example code:

require(sjplot); require(effects) fit <- lm(weight ~ diet * time, data = chickweight) sjp.int(fit, type = "eff") 

however, when try add argument such as:

theme(text = element_text(size = 14, family = "times new roman"))  

it doesn't work; nor when try enter similar code in sjp.settheme(). thoughts? thanks.

sjp.settheme doesn't allow specify font family (you'll find missing arg list). wasn't trudging through all of code figure out how alter function give font family spec, able alter font family through theme_set:

library(sjplot) library(effects) library(ggplot2) data("chickweight") fit <- lm(weight ~ diet * time, data = chickweight)  theme_set(theme_bw(base_family = 'ar berkley')) sjp.int(fit, type = "eff")  

enter image description here

theme_set(theme_bw(base_family = "times new roman")) sjp.int(fit, type = "eff")  

enter image description here


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -