Closed teindor closed 2 years ago
@teindor , with all respect, these are all ggplot2
questions. I'd recommend reading their manual or searching stackexchange!
True. It is the way ggplot2 interacts with the plot_profiles, and I couldn't figure the answer because it is not a native ggplot plot that I can assign "aes". Thank for your previous assistance
Just google gglplot hide legend and you'll find it. I google this every time I do it..
Hi, I tried to change the legend values and colors (instead of just using the number of groups). I used this code:
plot_profiles(results$model_1_class_6, add_line = T, rawdata = T, sd = F) + ggplot2::scale_color_manual(labels= c("Problematic users", "2","3","4","5","6"), values = c("#0444BF","#0584F2","#0AAFF1", "#EDF259","#A79674","#6465A5")) +ggplot2::xlab("Measures")+ ggplot2::ylab("Addiction score")+ggplot2::scale_x_continuous(breaks = c(1:6), labels = c("add_prob_ch"="Problemetic use baseline", "add_emo_ch"="Emotional gain baseline", "add_envi_ch"="Socio-environmental baseline", "add_prob_ch_t2"="Problemetic use 6mo", "add_emo_ch_t2"="Emotional gain 6mo", "add_envi_ch_2"="Socio-environmental 6mo"))
It works, but the original set of legend is also present
Suggestions?