如何在 geom_label_repel 中将覆盖其他标签的箭头发送到后面?

How do I send arrows which cover other labels to the back in geom_label_repel?

这看起来应该相当简单,但我找不到任何关于 ggrepel::geom_label_repel() 的论据。

数据样本:

df <- structure(list(Athletename = c("Aries Merritt", "Damian Warner"
), Score = c(12.8, 13.44), Event = c("110m hurdles", "110m hurdles"
), Points = c(1135, 1048), Record = c("World Record", "Decathlon Record"
), score_and_points = c("12.8s, 1135pts", "13.44s, 1048pts")), row.names = c(NA, 
-2L), class = c("tbl_df", "tbl", "data.frame"), .Names = c("Athletename", 
"Score", "Event", "Points", "Record", "score_and_points"))

ggplot2 代码:

ggplot(data = data.frame(x = 0), mapping = aes(x = x)) +
  geom_point(data = df, aes(x=Score, y=Points, colour=Record)) +
  geom_label_repel(data = df, 
                   aes(x=Score, y=Points, label = Athletename), 
                   direction = "x",
                   nudge_x = -10) +
  geom_label_repel(data = df, 
                   aes(x=Score, y=Points, label = score_and_points), 
                   direction = "y",
                   nudge_y = -200) +
  scale_y_continuous(name = "Points", 
                     breaks = seq(0,1500,100),
                     limits = c(0,1500)) +
  scale_x_reverse(name = "110m hurdles time (m)",
                     breaks = seq(29,12,-1),
                     limits=c(29,12)) +
  theme(legend.title = element_blank(), legend.position = "top")

Hacky 但有效:添加 geom_label_repel 调用的副本,但添加了 segment.alpha = 0。那么所有的标签都会在所有的箭头之上。

library(ggrepel)
ggplot(data = data.frame(x = 0), mapping = aes(x = x)) +
  geom_point(data = df, aes(x=Score, y=Points, colour=Record)) +
  geom_label_repel(data = df,
                   aes(x=Score, y=Points, label = Athletename),
                   direction = "x",
                   nudge_x = -10) +
  geom_label_repel(data = df, 
                   aes(x=Score, y=Points, label = score_and_points), 
                   direction = "y",
                   nudge_y = -200, ) +
  geom_label_repel(data = df, 
                   aes(x=Score, y=Points, label = score_and_points), 
                   direction = "y", segment.alpha = 0,
                   nudge_y = -200, ) +
  scale_y_continuous(name = "Points", 
                     breaks = seq(0,1500,100),
                     limits = c(0,1500)) +
  scale_x_reverse(name = "110m hurdles time (m)",
                  breaks = seq(29,12,-1),
                  limits=c(29,12)) +
  theme(legend.title = element_blank(), legend.position = "top")