Bland-Altman-Plot: legend for lines or entering values next to the lines

library(ggplot2)
ggplot(df, aes(x = df_avg, y =difference )) +
geom_point(size=2) +
geom_hline(yintercept = 0, colour = "darkgreen") +
geom_hline(yintercept = mean_diff) +
geom_hline(yintercept = lower, colour = "red", linetype="dashed") +
geom_hline(yintercept = upper, colour = "red", linetype="dashed") +
ggtitle("B") +
ylab("Difference of the two method measurements ") +
xlab("mean of the two method measurements") +
theme(plot.title = element_text(hjust = 0.5))

I still need a legend to the inserted lines or the possibility to enter values next to the lines in the figures. Can someone help me with that?

Best,
Clarissa

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.