I need to find a way to annotate a reference line at the same angle as the reference line itself.
The following statement will produce the reference line and the label above it. However, the slope of the line may change and I need to find a way make sure the annotation is always at the same angle.
plot(1:10,1:10)
abline(a=8, b=-1)
text(x=4, y=5, "reference line label", srt=-28)
Is there a simple way to do it in R? Thanks in advance