Re: [R] overlay two histograms ggplot

2017-12-14 Thread Thierry Onkelinx
Dear Elahe, Something like joint <- rbind( data.frame(x = gg$Az, veg = gg$veg, type = "Alz"), data.frame(x = tt$Cont, veg = gg$veg, type = "Cont") ) ggplot(joint, aes(x = x, fill = veg, colour = type)) + geom_plot(alpha = 0.2) Best regards, ir. Thierry Onkelinx Statisticus / Statistician V

[R] overlay two histograms ggplot

2017-12-13 Thread Elahe chalabi via R-help
Hi all, How can I overlay these two histograms? ggplot(gg, aes(gg$Alz, fill = gg$veg)) + geom_histogram(alpha = 0.2) ggplot(tt, aes(tt$Cont, fill = tt$veg)) + geom_histogram(alpha = 0.2) thanks for any help! Elahe __ R-help@r-project.org mailing list