[R] Histogram color

Ashta sewashm at gmail.com
Thu Mar 4 13:41:37 CET 2010


In a  histogram , is it possible to have different colors?
Example. I generated

x <- rnorm(1000000)
hist(x)

I want the histogram to have different colors based on the following condition
 mean(x)+sd(x)   with red color and  mean(x) - sd(x) with red color as
well. The  middle  one with blue color.
Is it possible to do that in R?
Thanks



More information about the R-help mailing list