how to set my barplots results in ascending order?

Here's one solution, explicitly select the order of levels in the aes arguement,


As Andres pointed out, it'll be easier to take your example and offer a suggest if you provide a reproducible example. What's wrong with what you provided so far? Be sure to format your code (FAQ: How to format your code), and you refer to example data that no one can access.

I'd cut out all your steps from library(readxl) to CAJ5 and just focus on the ggplot with a fake toy data example (Best Practices: how to prepare your own data for use in a `reprex` if you can’t, or don’t know how to reproduce a problem with a built-in dataset?).

1 Like