Code for generating a stack bar graph of the varius morphological phenotypes of DNhe2

Plotting the data…..

library(ggplot2)
## Warning: package 'ggplot2' was built under R version 3.1.3
fsum=read.csv("160727_fracNonIntersect2.csv") 
fsum$genotype = factor(fsum$genotype, levels(fsum$genotype)[c(2,1)])
p= ggplot(fsum, aes(y = percent, x= genotype, fill = phenotype )) 
p + geom_bar(stat = "identity",width = 0.9,  ymax = 1.0, colour = "black")  + theme_classic() + scale_y_continuous(limits= c(0,1), breaks = c(seq(from=0, to= 1, by = 0.1))) + theme(axis.text = element_text(size = 14), axis.line = element_line(size = 2)) 

plot of chunk unnamed-chunk-1