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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -