Hello All,
I am trying to update my plot legend by entering,
scale_fill_discrete(name = "Sex", labels = c("Female", "Male"))
But the legend does not update. Complete code here:
fair_sex <- ggplot(data = Fair, mapping = aes(x = ym, y = nbaffairs, color = sex)) +
geom_jitter() +
geom_smooth()
fair_sex <- fair_sex + labs(title = "Number of Affairs by Sex", x = "Number of Affairs", y = "Years Married")
fair_sex <- fair_sex + scale_fill_discrete(name ="Sex", labels c("Female", "Male"))
print(fair_sex)
Any suggestions?