How do I remove the 'a' in legends when I use geom_label_repel?

I want to keep the legends, but I don't understand why I see that annoying 'a'...
Any help? Here is a small reprex:

library(dplyr)
library(ggplot2)
library(ggrepel)
iris %>%
ggplot(aes(x = Sepal.Length,
y= Sepal.Width,
fill = Species,
label = round(rnorm(nrow(iris))))) +
geom_label_repel()

I found a solution on Examples • ggrepel

library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
library(ggplot2)
library(ggrepel)

iris %>%
  ggplot(aes(x=Sepal.Length, y=Sepal.Width, 
             label=round(rnorm(nrow(iris))))) +
  geom_label_repel(aes(fill=Species)) +
  guides(fill = guide_legend(override.aes = aes(label = ""))) 

Created on 2020-06-06 by the reprex package (v0.3.0)

Thank you so much! It was really useful

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.