I do not have any experience with the ggeffects package, so maybe it might be better to ask this question to the Statistics Globe Facebook group. # = element_text(family="Calibri", size=12,vjust=2), # title = element_text(family="Calibri", size=12,hjust=0.5), # theme(plot.title = element_text(hjust = 0.5), text=element_text(family="Calibri", size=12,color="grey20"), # xlab("")+ ylab("Predicted Probability of Hit") + ggtitle ("Effect of Listening Time") + Plot(p5, ci.style="errorbar", add.data=FALSE, dodge = 1) data = FALSE, dodge = 1 ) # + # xlab("")+ ylab("Predicted Probability of Hit") + ggtitle ("Effect of Listening Time") + # theme(plot.title = element_text(hjust = 0.5), text=element_text(family="Calibri", size=12,color="grey20"), # title = element_text(family="Calibri", size=12,hjust=0.5), # = element_text(family="Calibri", size=12,vjust=2), # = element_text(family="Calibri",vjust=0.5, size=10), # = element_text(family="Calibri",vjust=0.5, size=10), # = element_line(c("60","70"), color="gre圓5", size=0.2)) I could just copy the value but then it's tricky for the error bars. I don't really know how to solve this issue. Scale_x_discrete() doesn't work cause apparently there is an already existing mapping of the aesthetic (probably inherent to "plot" from ggeffects?) In this way on my x axis I get 0 and 1 but I want to change it with 0=10 seconds and 1=50 seconds. Theme(plot.title = element_text(hjust = 0.5), text=element_text(family="Calibri", size=12,color="grey20"), Xlab("")+ ylab("Predicted Probability of Hit") + ggtitle ("Effect of Listening Time") + Plot(p5, ci.style="errorbar", add.data=FALSE, dodge = 1) + #p5 is now a ame with x (level 0 or 1) in the first column, the predicted value in the 2nd column and the Standard error in column n☃ P5 <- ggemmeans(B9, "variable") #where B9 is a GLMM S4 object Thank you for your help it’s a very easy solution! However in my case I am using plot (to plot ggeffects object from ggeffects package), and apparently it doesn’t work. If you have further questions, please let me know in the comments section below. However, please note that it would also be possible to change the axis values of other types of graphs such as a histogram, boxplot, barchart, line plot, or a density plot by using the same kind of R code. In this tutorial, I have illustrated how to do this based on an exemplifying scatterplot. ![]() In summary: You have learned in this tutorial how to change the values on our axis scale in the R programming language.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |