trying to change the x axis labels but when I run the part of the code that's #'d out, it gets rid of all the values on the axis, rather than replacing them with the labels I indicated.
median_income %>% ggplot(aes(y = estimate, x = name, color = sex)) +
geom_point(size = 3) +
geom_path(aes(group = name), size = .5, color = "gray65") +
theme_din(xgrid = T, ygrid = F) +
scale_color_manual(values = c("#D9CFE4", "#766A84")) +
labs(y = "Median income ($)", x = NULL, title = "Median indiviual earnings", subtitle = "Full-time, year-round workers, 2017") +
theme(legend.title = element_blank()) +
#scale_y_discrete(labels = c("50k", "100k", "150k", "200k")) +
coord_flip()
instead of no axis, I want the values in labels = c() to become my axis labels.
sample data:
name <- c("Darien", "Stratford", "Darien", "Stratford")
sex <- c("male", "male", "female", "female")
estimate <- c(217813, 63105, 87946, 50764)