starwars %>%ggplot(aes(sex, height, fill = sex)) +geom_col() +theme_nice() +scale_fill_discrete(labels=c('F', 'H', 'M', "N", "Missing")) # or scale_color_discrete if generating the legend using "color" parameter instead of fill
starwars %>%ggplot(aes(sex, height, fill = sex)) +geom_col() +theme_nice() +labs(fill ="Gender") # or "color =" if generating the legend using "color" parameter instead of fill