This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to name the line at ggplot?

Hi, Everyone! I want to annotate each line with factor variable (chain.lenght) like shown on the picture.enter image description here

Is it possible?

Here is my code:

  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()
ggplot

Hello rimgubaev!

We believe that this post does not fit the main topic of this site.

This is a pure R question. Multiple of your previous questions have been closed already due to not being bioinformatics related. Please respect that Biostars is a bioinformatics community and not a general-purpose forum for programming issues.

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

0 answers

No answers yet.

Log in to answer this question.