Giorgio Garziano
2015-Dec-24 17:48 UTC
[R] to change the size of the line in the plot created in ggplot2
Hi Marna, I prepared this toy example that should help you. x <- seq(1:100) y <- x*x avg <- mean(y) avg.v <- rep(avg,100) # your average column data df <- as.data.frame(cbind(x, y, avg.v)) library(ggplot2) ggplot(data=df[,-3], aes(x=x, y=y)) + geom_line() + geom_line(data=df[,c(1,3)], color='blue', aes(x=x, y=avg)) Best, -- GG [[alternative HTML version deleted]]