Skip to content

Instantly share code, notes, and snippets.

@jennybc
Created October 10, 2014 01:06
Show Gist options
  • Save jennybc/6f3fa527b915b920fdd5 to your computer and use it in GitHub Desktop.
Save jennybc/6f3fa527b915b920fdd5 to your computer and use it in GitHub Desktop.
Reverse the order of a categorical axis in ggplot2
scale_x_discrete(limits = rev(levels(the_factor)))
@tnat1031
Copy link

this helped me too, thanks!

@ficrawford
Copy link

Still helpful in 2024!!! Thanks so much :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment