Dear all,
I ran a brms model with two continuous predictors and am trying to plot the effect. Specifically, I want to customize the linetype of the predictor to make it photocopy safe.
I took a look at the following topic already: Change aesthetics conditional_effects but there it is only explained how to change the color of the line and the color of the ribbon, but I want to change the linetype of the lines using for example scale_linetype_manual.
I use the reproducible example also used in that topic:
data(mtcars)
mtcars$carb<- as.ordered(mtcars$carb)
model<-brm(carb~hp, data=mtcars, family=sratio)
#creating conditional effects object
c_eff <- conditional_effects(model, categorical = T)
#creating plot
ugly_plot <- plot(c_eff, plot = FALSE)[[1]] +
scale_linetype_manual(values = c("1"= "solid",
"2"= "dashed",
"3"= "dotted",
"4" = "twodash",
"5" = "dotdash",
"6" = "longdash")) +
scale_fill_manual(values = c("1"= "green",
"2"= "#7570b3",
"3"= "#1b9e77",
"4" = "grey20",
"5" = "blue",
"6" = "grey80")) +
scale_color_manual(values = c("1"= "black",
"2"= "black",
"3"= "orange",
"4" = "grey20",
"5" = "blue",
"6" = "grey80"))
ugly_plot
Please also provide the following information in addition to your question:
- Operating System: Windows 10
- brms Version: 2.11.1