Using the following dataframe and ggplot...
sample ="BC04"
df<- data.frame(Name=c("Pseudomonas veronii", "Pseudomonas stutzeri", "Janthinobacterium lividum", "Pseudomonas viridiflava"),
Abundance=c(7.17, 4.72, 3.44, 3.33))
ggplot(data=df, aes(x=sample, y=Abundance, fill=Name)) +
geom_bar(stat="identity")
... creates the following graph
Altough the "geom_bar(stat="identity")" is set to "identity", it still ignores the order in the dataframe. I would like to get a stack order based on the Abundance percentage (Highest percentage at the top with ascending order)
BC04
in the dataset – akrun