So, I have this chunk:
stats %>%
ggplot()+
geom_col(mapping = aes(x = job_title, y = salary, fill = salary, scales = "free", ))+
geom_smooth(mapping = aes(x = job_title, y = salary, col = "red"))+
scale_y_log10()+
scale_y_continuous(limits = c(0, 500000), breaks = c(0, 100000, 200000, 300000, 400000, 500000))+
guides(color= guide_legend(), size = guide_legend())+
xlab("Job Titles")+
ylab("Salaries")+
coord_flip()+
labs(title = "Salaries by Job Title",
subtitle = "Averaged for all Experience Levels"
)
ggsave("avg_sal_allxp.png")
and it produces this plotted bar graph: Salary Bar graph/ggplot
....and no amount of manipulation with "y = reorder(salary, -salary)" etc will seem to solve this issue for me?
The issue is one of "Error: Discrete value supplied to continuous scale". Any help on how to reorder the salaries from highest to lowest here? Thank you all....again :)