Hi all,
I am fairly new to R. I am plotting a distribution using ggplot2, geom_freqpoly. I can add lines that show 0-25%, 25-50%, 50-75%, and 75-100% of the population, but I'd like to shade each quartile in different colours. I've attached a sample data set.
Here is my code:
library(ggplot2)
CD25 <- read.csv(file = "CD25 distribution Tregs.csv")
summary(CD25)
ggplot(CD25)+
geom_freqpoly(aes(x=CD25.MFI, y =(..ncount..)),colour = "black", binwidth = 0.01)+
scale_x_log10()+geom_vline(xintercept = 52.718,col="grey",lwd = 0.5)+
geom_vline(xintercept = 101.151,col="grey",lwd = 0.5)+
geom_vline(xintercept = 165.561,col="grey",lwd = 0.5)+
theme_bw()+theme(axis.ticks.length= unit(0.3,"cm"),panel.grid.major = element_blank (),panel.grid.minor = element_blank ())
Thanks for any help you can provide,
Hari