I have a problem with labels.I cannot add labels. I get this message :
geom_label requires the following missing aesthetics: x, y and label
Run `rlang::last_error()` to see where the error occurred.
1: Ignoring unknown aesthetics: label
2: Use of `ust_lks$x` is discouraged. Use `x` instead.
3: Use of `ust_lks$y` is discouraged. Use `y` instead.
This is my code:
#library(ggplot2)
#library(ggsoccer)
ggplot(ust_lks) +
annotate_pitch(dimensions = pitch_custom,
colour = "white",
fill = "springgreen4",
limits = FALSE) +
theme_pitch()+
theme(panel.background = element_rect(fill = "springgreen4"))+
geom_point(aes(x = ust_lks$x-2, y = ust_lks$y+14,label=rownames(ust_lks)),
fill = "white",
color= "red",
shape = 21,
size = 8)+
geom_text()