0

I have a dataframe DiatomFiltered containing the column species. I want to have a ggplot (ggplot2) of all species and their frequency ordered from highest to lowest. The below code works, but the names are a mess (because of way too many species names) so I want to remove that and i want the frequencies ordered. How do i do this?

ggplot(DiatomFiltered, aes(species)) +
  geom_bar(fill = "#0073C2FF")

plot

Z.Lin
  • 28,055
  • 6
  • 54
  • 94
Mapijs
  • 45
  • 7
  • 1
    Or https://stackoverflow.com/questions/3253641/order-discrete-x-scale-by-frequency-value/3256643#3256643 – stefan Jan 29 '21 at 13:04
  • 1
    And for the labels see https://stackoverflow.com/questions/35090883/remove-all-of-x-axis-labels-in-ggplot – stefan Jan 29 '21 at 13:04

0 Answers0