I have a simple data.frame
and here is my script, where I have one color for each Genotype and just wanted to label the 'X' Genotype:
ggplot(b, aes(x= V1, y = V2, label = Sample_name)) +
geom_point(color = dplyr::case_when(b$Genotype == "X" ~ "#606060",
b$Genotype == "Y" ~ "#85C1E9",
b$Genotype == "Z" ~ "#2980B9",
size = 2, alpha = 0.8) +
geom_label_repel(data = subset(b, Genotype == "X"),
box.padding = 0.35,
point.padding = 0.5,
size = 4,
segment.color = 'grey50')
However, my legend disappeared and I don't get why. I am interested in Genotype legend.