I have a ggplot graph that I would like to insert a custom line below 0 as “Inside” and above 0 as “Bleached”.
I'm doing it:
ggplot(z, aes(Date, Breach1/60, group=Jobs, label=c("Within SLA", "Breached SLA"))) +
geom_line(size=1) +
theme_bw() + ylab("Hours") + xlab("Date") + opts(title="Jobs") +
geom_hline(yintercept=0, color="red", size=2) + geom_text(hjust=0, vjust=3)
This seems to put text everywhere. I like to put one text above zero and one text below zero. Any ideas?
source
share