I have a horizontal line in a ggplot and I would like to label it\'s value (7.1) on the y axis.
library(ggplot2) df <- data.frame(y=c(1:10),x=c(1:10)) h &
How about something like this?
plot1 + geom_hline(aes(yintercept=h), colour="#BB0000", linetype="dashed") + geom_text(aes( 0, h, label = h, vjust = -1), size = 3)