Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. library(ggplot2)
  2.  
  3. ## To sort colY in descending order in the plot
  4. ggplot(data=df, aes(x=reorder(colX, -colY), y=colY)) +
  5. geom_bar(stat="identity") +
  6. theme(axis.text.x = element_text(angle = 45, hjust = 1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement