This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Scatter plot text jammed together

In a scatter plot, sometimes you may want to label some points with text. The problem is that in R, there is not (or I cannot find out) a way to automatically label each selected point and not to allow overlaying the labelling text to each other.

Any one knows an easy way to avoid this in R?

Thank you!

r

1 answer

If you are using ggplot2, the answer is ggrepel. See https://cran.r-project.org/web/packages/ggrepel/index.html and https://cran.r-project.org/web/packages/ggrepel/vignettes/ggrepel.html

(And if you aren't using ggplot2, well, then you should)

Awesome! Thanks much!

And -- I love biostars. :)

Log in to answer this question.