[Solved] R (ggplot2): line with data labels [closed]
[ad_1] You need to combine DATA2 and DATA3 to one vector and create a vector to define your data. library(ggplot2) x1 <- c(0.2, 0.27, 0.4, 0.37, 0.42, 0.45, 0.70) x2 <- c(0.25, 0.32, 0.28, 0.24, 0.20, 0.19, 0.20) data <- data.frame(x = rep(c(1:7), 2), label = rep(c(“x1”, “x2”), each = 7), y = c(x1, x2)) … Read more