I have some very large files that contain a genomic position (position) and a corresponding population genetic statistic (value). I have successfully plotted these values and wo
You can achieve this slightly more elegantly by incorporating quantile and cut into the aes colour expression. For example col=cut(d,quantile(d)) in this example:
d = as.vector(round(abs(10 * sapply(1:4, function(n)rnorm(20, mean=n, sd=.6)))))
ggplot(data=NULL, aes(x=1:length(d), y=d, col=cut(d,quantile(d)))) +
geom_point(size=5) + scale_colour_manual(values=rainbow(5))

I've also made a useful workflow for pretty legend labels which someone might find handy.