0

i have created a percent stacked bar chart but i am having troubling trying to change the order of the two of the fill columns, i only want to rearrange blastocyst and morula, so that blastocyst is on the top.

i have tried every code thinkable and i cant seem to do it

here is the code that i have used to produce this graph

ggplot(ThreeSpecies,aes(y=percent, x = Species,fill=Stage))+
       geom_bar(stat="identity",position = position_fill(vjust= 1, reverse = TRUE))+
       theme(panel.grid.major = element_blank(),panel.grid.minor = element_blank())+
       scale_y_continuous(labels = scales::percent)+
       ylab("Percentage")+
       xlab("Species")
Waldi
  • 39,242
  • 6
  • 30
  • 78
R98979
  • 1
  • Please read [this post](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) on how to ask a good question in R. Particularly, please include a reproducible example by editing the output of ``dput(head(data))`` into your original question. This will help people trying to answer your question. Thanks. – user438383 Feb 03 '21 at 15:11
  • 1
    Does this answer your question? [How to control ordering of stacked bar chart using identity on ggplot2](https://stackoverflow.com/questions/32345923/how-to-control-ordering-of-stacked-bar-chart-using-identity-on-ggplot2) – LMc Feb 03 '21 at 15:19

0 Answers0