Re-order column for sorted bar plot
Sorting a column in the dataframe does not seem to be sufficient to get a barplot that is also sorted by value. Instead, the column needs to be sorted within the ggplot() function call:
ggplot(data=df, aes(x=reorder(colX, -colY), y=colY)) + geom_bar(stat="identity")
StackOverflow answer

















