Entering edit mode
5.5 years ago
whrhkdrhs
•
0
Hi. I'm R starter. I'm using ggscatter to draw a regression line. The label is sitting down like that. How can I move up? The code is shown below.
ggscatter(JJ_1year, x = "Ammonium", y = "Potassium",
add = "reg.line", # Add regression line
color = "Season", palette = "jco", # Color by groups "Season"
shape = "Season", # Change point shape by groups "Season"
fullrange = TRUE, # Extending the regression line
rug = FALSE # Add marginal rug
)+
stat_cor(method = "spearman", aes(color = Season)) # Add correlation coefficient