Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

order barplot ggplot2 by value

ggplot(df, aes(x = reorder(x_col_valus, -col_to_sort_by), y = value)) + 
  geom_bar(stat = "identity")
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #order #barplot
ADD COMMENT
Topic
Name
4+3 =