genocount <-ggplot(SNPs, aes(genotype))
genocount + geom_bar()
Creates this Bar Chart:
I would like to be able to display the percentage contribution per chromosome to each genotype in a stacked orientation (those are displayed along the x axis). I've tried some methods that I've seen suggested by others, but they return different errors...I'm not sure if there's an incompatibility with my data set or if it's something else.
Thanks for your help!
library(scales)
ggplot(SNPs, aes(genotype))
genocount + geom_bar(aes(position = "fill", fill = chromosome))+
geom_text(aes(label = percent(chromosome/sum(chromosome))))
scale_y_continuous(labels = percent_format())