如何阻止 R ggplot 将 "a" 显示为图例中的符号?

How do I stop R ggplot from displaying "a" as the symbol in my legend?

最近我在 R 中使用 ggplot 做了一个绘图。当我为 ggplot_label_repel 添加代码时,图例中的符号突然从圆圈变成字母 "a"。

这和wingdings字体有关系吗?如何修复我的图例?

我在这里制作了一些带有可重现错误的示例代码:

#packages
library(dplyr)
library(ggplot2)
library(ggrepel)
#Creating an example data frame
years <- c(1990:1999)
population <- c(1:10)
df <- tibble(years,population)

#Adding random information to the df so that I can do coloring and labeling on my ggplot
df$group <- "low population"
df[8:10, 3] <- "high population"
df$status <- "highly endangered"
df$status[3:5] <- "endangered"
df$status[5:7] <- "threatened"
df$status[8:10] <- "recovered"

#The ggplot with the legend I want
ggplot(df, aes(years,population, color= group))+
  geom_point()

#The ggplot with the labeling I want but the wrong legend
ggplot(df, aes(years,population, color= group))+
  geom_point()+
  geom_label_repel(data=df %>% filter(group =="high population"),
                   aes(label= status))

提前致谢!

添加 ,show.legend =F 到 geom_label_repel()

像这样:

ggplot(df, aes(years,population, color= group))+
  geom_point()+
  geom_label_repel(data=df %>% filter(group =="high population"),
                   aes(label= status),show.legend  = F)