Lines between points and their labels: r - Label points in geom_point - Stack Overflow

PHOTO EMBED

Wed Nov 10 2021 15:55:10 GMT+0000 (Coordinated Universal Time)

Saved by @ricardo_danza #r

library(ggplot2)
library(ggrepel)

nba <- read.csv("http://datasets.flowingdata.com/ppg2008.csv", sep = ",")

nbaplot <- ggplot(nba, aes(x= MIN, y = PTS)) + 
  geom_point(color = "blue", size = 3)

### geom_label_repel
nbaplot + 
  geom_label_repel(aes(label = Name),
                  box.padding   = 0.35, 
                  point.padding = 0.5,
                  segment.color = 'grey50') +
  theme_classic()
content_copyCOPY

https://stackoverflow.com/questions/15624656/label-points-in-geom-point