I am trying to change the plotting order of groups in a stacked bar chart. Others have asked similar questions e.g. here and here but I can\'t seem to get anything similar t
You can achieve this by ordering the whole data.frame:
data.frame
plot1 <- ggplot(data = df[order(df$site, df$group),], aes(x=reorder(site, latitude), y=taxa, fill=group))+ geom_bar(stat="identity") + coord_flip() plot1