I am plotting a regression model with sjPlot's plot_model()
. I want to change my line colors from sjPlot theme (red & blue lines) to black & white or grayscale. However, when I utilize set_theme(theme_bw())
, the plot appearance does not change (theme_bw
is from ggplot2, according to the dropdown I see while typing the function).
The plot appearance however does change when I select one of the available sjPlot themes (theme_538
, theme_blank
, theme_sjplot
and theme_sjplot2
), which all render the lines red & blue, but change the plot background, so I think I got the function right.
How can I use a bw or gs theme or manually set the line colors to black & white for my plot?
library(ggplot2)
library(sjPlot)
library(sjmisc)
#set_theme(theme_bw()) # this does not change the plot appearance
set_theme(theme_538()) # this does change the plot background appearance
M <- glm(DV ~ IV1 + IV2 + IV3 + IV1*IV2*IV3, data = data5, family = quasibinomial("logit"))
p <- plot_model(M, type = "pred", terms = c("IV1", "IV2", "IV3 [-1,0,1]"), theme = theme_get())
p
ps: according to the sjPlot resources I find online, there should be more sjPlot themes available than those I see. That is strange. Moreover, I read that the set_theme()
function should work with ggplot2 themes, which seems to not be the case here. Any ideas where the bug is? Maybe I am overseeing something very simple?
edit: I am using R version 3.5.0 and Rstudio version 1.1.383 Thank you!!