I want to annotate each line with factor variable (chain.length) like shown on the picture. How would I do it?
Here is the code for picture above.
ggplot(mz_rt, aes(rt, mz, size = acex, colour = as.factor(double.bonds))) +
geom_line(aes(group = as.factor(chain.len)), colour = "grey", size = 0.3) +
geom_point() +
scale_radius(breaks = seq(from = 0, to = 1, by = 0.2)) +
theme(legend.position="bottom") +
theme_light()