Skip to content
Prev 293761 / 398502 Next

How to plot stacked histogram in R?

On 05/07/2012 02:31 PM, Manish Gupta wrote:
Ah, I didn't read the question carefully. I would use the "hist" 
function on both series and the plot the result with "barplot".

firstone<-hist(rnorm(100))$counts
secondone<-hist(rnorm(100))$counts
barplot(rbind(firstone,secondone))

Jim